if(!AmCharts)var AmCharts={};AmCharts.themes={};AmCharts.inheriting={};AmCharts.Class=function(t){var e=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};t.inherits?(e.prototype=new t.inherits(AmCharts.inheriting),e.base=t.inherits.prototype,delete t.inherits):(e.prototype.createEvents=function(){for(var t=0,e=arguments.length;t<e;t++)this.events[arguments[t]]=[]},e.prototype.listenTo=function(t,e,i){t.events[e].push({handler:i,scope:this})},e.prototype.addListener=function(t,e,i){this.events[t].push({handler:e,scope:i})},e.prototype.removeListener=function(t,e,i){t=t.events[e];for(e=t.length-1;0<=e;e--)t[e].handler===i&&t.splice(e,1)},e.prototype.fire=function(t,e){for(var i=this.events[t],s=0,a=i.length;s<a;s++){var r=i[s];r.handler.call(r.scope,e)}});for(var i in t)e.prototype[i]=t[i];return e};AmCharts.charts=[];AmCharts.addChart=function(t){AmCharts.charts.push(t)};AmCharts.removeChart=function(t){for(var e=AmCharts.charts,i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1)};AmCharts.IEversion=0;AmCharts.isModern=!0;AmCharts.navigator=navigator.userAgent.toLowerCase();-1!=AmCharts.navigator.indexOf("msie")&&(AmCharts.IEversion=parseInt(AmCharts.navigator.split("msie")[1]),document.documentMode&&(AmCharts.IEversion=Number(document.documentMode)),9>AmCharts.IEversion&&(AmCharts.isModern=!1));AmCharts.dx=0;AmCharts.dy=0;if(document.addEventListener||window.opera)AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=.5,AmCharts.dy=.5;document.attachEvent&&(AmCharts.isNN=!1,AmCharts.isIE=!0,AmCharts.isModern||(AmCharts.dx=0,AmCharts.dy=0));window.chrome&&(AmCharts.chrome=!0);AmCharts.handleResize=function(){for(var t=AmCharts.charts,e=0;e<t.length;e++){var i=t[e];i&&i.div&&i.handleResize()}};AmCharts.handleMouseUp=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];s&&s.handleReleaseOutside(t)}};AmCharts.handleMouseMove=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];s&&s.handleMouseMove(t)}};AmCharts.resetMouseOver=function(){for(var t=AmCharts.charts,e=0;e<t.length;e++){var i=t[e];i&&(i.mouseIsOver=!1)}};AmCharts.onReadyArray=[];AmCharts.ready=function(t){AmCharts.onReadyArray.push(t)};AmCharts.handleLoad=function(){AmCharts.isReady=!0;for(var t=AmCharts.onReadyArray,e=0;e<t.length;e++)(0,t[e])()};AmCharts.useUTC=!1;AmCharts.updateRate=40;AmCharts.uid=0;AmCharts.getUniqueId=function(){AmCharts.uid++;return"AmChartsEl-"+AmCharts.uid};AmCharts.isNN&&(document.addEventListener("mousemove",AmCharts.handleMouseMove,!0),window.addEventListener("resize",AmCharts.handleResize,!0),document.addEventListener("mouseup",AmCharts.handleMouseUp,!0),window.addEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.attachEvent("onmousemove",AmCharts.handleMouseMove),window.attachEvent("onresize",AmCharts.handleResize),document.attachEvent("onmouseup",AmCharts.handleMouseUp),window.attachEvent("onload",AmCharts.handleLoad));AmCharts.clear=function(){var t=AmCharts.charts;if(t)for(var e=0;e<t.length;e++)t[e].clear();AmCharts.charts=null;AmCharts.isNN&&(document.removeEventListener("mousemove",AmCharts.handleMouseMove,!0),window.removeEventListener("resize",AmCharts.handleResize,!0),document.removeEventListener("mouseup",AmCharts.handleMouseUp,!0),window.removeEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.detachEvent("onmousemove",AmCharts.handleMouseMove),window.detachEvent("onresize",AmCharts.handleResize),document.detachEvent("onmouseup",AmCharts.handleMouseUp),window.detachEvent("onload",AmCharts.handleLoad))};AmCharts.makeChart=function(t,e){var i=e.type,s=e.theme;AmCharts.isString(s)&&(s=AmCharts.themes[s],e.theme=s);var a;switch(i){case"serial":a=new AmCharts.AmSerialChart(s);break;case"xy":a=new AmCharts.AmXYChart(s);break;case"pie":a=new AmCharts.AmPieChart(s);break;case"radar":a=new AmCharts.AmRadarChart(s);break;case"gauge":a=new AmCharts.AmAngularGauge(s);break;case"funnel":a=new AmCharts.AmFunnelChart(s);break;case"map":a=new AmCharts.AmMap(s);break;case"stock":a=new AmCharts.AmStockChart(s)}AmCharts.extend(a,e);AmCharts.isReady?a.write(t):AmCharts.ready(function(){a.write(t)});return a};AmCharts.toBoolean=function(t,e){if(void 0===t)return e;switch(String(t).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(t)}};AmCharts.removeFromArray=function(t,e){var i;for(i=t.length-1;0<=i;i--)t[i]==e&&t.splice(i,1)};AmCharts.getDecimals=function(t){var e=0;isNaN(t)||(t=String(t),-1!=t.indexOf("e-")?e=Number(t.split("-")[1]):-1!=t.indexOf(".")&&(e=t.split(".")[1].length));return e};AmCharts.getStyle=function(t,e){var i="";document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,"").getPropertyValue(e):t.currentStyle&&(e=e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),i=t.currentStyle[e]);return i};AmCharts.removePx=function(t){return Number(t.substring(0,t.length-2))};AmCharts.getURL=function(t,e){if(t)if("_self"!=e&&e)if("_top"==e&&window.top)window.top.location.href=t;else if("_parent"==e&&window.parent)window.parent.location.href=t;else{var i=document.getElementsByName(e)[0];i?i.src=t:window.open(t)}else window.location.href=t};AmCharts.ifArray=function(t){return t&&0<t.length?!0:!1};AmCharts.callMethod=function(t,e){var i;for(i=0;i<e.length;i++){var s=e[i];if(s){if(s[t])s[t]();var a=s.length;if(0<a){var r;for(r=0;r<a;r++){var h=s[r];if(h&&h[t])h[t]()}}}}};AmCharts.toNumber=function(t){return"number"==typeof t?t:Number(String(t).replace(/[^0-9\-.]+/g,""))};AmCharts.toColor=function(t){if(""!==t&&void 0!==t)if(-1!=t.indexOf(",")){t=t.split(",");var e;for(e=0;e<t.length;e++){var i=t[e].substring(t[e].length-6,t[e].length);t[e]="#"+i}}else t=t.substring(t.length-6,t.length),t="#"+t;return t};AmCharts.toCoordinate=function(t,e,i){var s;void 0!==t&&(t=String(t),i&&i<e&&(e=i),s=Number(t),-1!=t.indexOf("!")&&(s=e-Number(t.substr(1))),-1!=t.indexOf("%")&&(s=e*Number(t.substr(0,t.length-1))/100));return s};AmCharts.fitToBounds=function(t,e,i){t<e&&(t=e);t>i&&(t=i);return t};AmCharts.isDefined=function(t){return void 0===t?!1:!0};AmCharts.stripNumbers=function(t){return t.replace(/[0-9]+/g,"")};AmCharts.roundTo=function(t,e){if(0>e)return t;var i=Math.pow(10,e);return Math.round(t*i)/i};AmCharts.toFixed=function(t,e){var i=String(Math.round(t*Math.pow(10,e)));if(0<e){var s=i.length;if(s<e){var a;for(a=0;a<e-s;a++)i="0"+i}s=i.substring(0,i.length-e);""===s&&(s=0);return s+"."+i.substring(i.length-e,i.length)}return String(i)};AmCharts.formatDuration=function(t,e,i,s,a,r){var h=AmCharts.intervals,o=r.decimalSeparator;if(t>=h[e].contains){var n=t-Math.floor(t/h[e].contains)*h[e].contains;"ss"==e&&(n=AmCharts.formatNumber(n,r),1==n.split(o)[0].length&&(n="0"+n));("mm"==e||"hh"==e)&&10>n&&(n="0"+n);i=n+""+s[e]+""+i;t=Math.floor(t/h[e].contains);e=h[e].nextInterval;return AmCharts.formatDuration(t,e,i,s,a,r)}"ss"==e&&(t=AmCharts.formatNumber(t,r),1==t.split(o)[0].length&&(t="0"+t));("mm"==e||"hh"==e)&&10>t&&(t="0"+t);i=t+""+s[e]+""+i;if(h[a].count>h[e].count)for(t=h[e].count;t<h[a].count;t++)e=h[e].nextInterval,"ss"==e||"mm"==e||"hh"==e?i="00"+s[e]+""+i:"DD"==e&&(i="0"+s[e]+""+i);":"==i.charAt(i.length-1)&&(i=i.substring(0,i.length-1));return i};AmCharts.formatNumber=function(t,e,i,s,a){t=AmCharts.roundTo(t,e.precision);isNaN(i)&&(i=e.precision);var r=e.decimalSeparator;e=e.thousandsSeparator;var h;h=0>t?"-":"";t=Math.abs(t);var o=String(t),n=!1;-1!=o.indexOf("e")&&(n=!0);0<=i&&!n&&(o=AmCharts.toFixed(t,i));var l="";if(n)l=o;else{var o=o.split("."),n=String(o[0]),d;for(d=n.length;0<=d;d-=3)l=d!=n.length?0!==d?n.substring(d-3,d)+e+l:n.substring(d-3,d)+l:n.substring(d-3,d);void 0!==o[1]&&(l=l+r+o[1]);void 0!==i&&0<i&&"0"!=l&&(l=AmCharts.addZeroes(l,r,i))}l=h+l;""===h&&!0===s&&0!==t&&(l="+"+l);!0===a&&(l+="%");return l};AmCharts.addZeroes=function(t,e,i){t=t.split(e);void 0===t[1]&&0<i&&(t[1]="0");return t[1].length<i?(t[1]+="0",AmCharts.addZeroes(t[0]+e+t[1],e,i)):void 0!==t[1]?t[0]+e+t[1]:t[0]};AmCharts.scientificToNormal=function(t){var e;t=String(t).split("e");var i;if("-"==t[1].substr(0,1)){e="0.";for(i=0;i<Math.abs(Number(t[1]))-1;i++)e+="0";e+=t[0].split(".").join("")}else{var s=0;e=t[0].split(".");e[1]&&(s=e[1].length);e=t[0].split(".").join("");for(i=0;i<Math.abs(Number(t[1]))-s;i++)e+="0"}return e};AmCharts.toScientific=function(t,e){if(0===t)return"0";var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E);Math.pow(10,i);mantissa=String(mantissa).split(".").join(e);return String(mantissa)+"e"+i};AmCharts.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};AmCharts.hitTest=function(t,e,i){var s=!1,a=t.x,r=t.x+t.width,h=t.y,o=t.y+t.height,n=AmCharts.isInRectangle;s||(s=n(a,h,e));s||(s=n(a,o,e));s||(s=n(r,h,e));s||(s=n(r,o,e));s||!0===i||(s=AmCharts.hitTest(e,t,!0));return s};AmCharts.isInRectangle=function(t,e,i){return t>=i.x-5&&t<=i.x+i.width+5&&e>=i.y-5&&e<=i.y+i.height+5?!0:!1};AmCharts.isPercents=function(t){if(-1!=String(t).indexOf("%"))return!0};AmCharts.findPosX=function(t){var e=t,i=t.offsetLeft;if(t.offsetParent){for(;t=t.offsetParent;)i+=t.offsetLeft;for(;(e=e.parentNode)&&e!=document.body;)i-=e.scrollLeft||0}return i};AmCharts.findPosY=function(t){var e=t,i=t.offsetTop;if(t.offsetParent){for(;t=t.offsetParent;)i+=t.offsetTop;for(;(e=e.parentNode)&&e!=document.body;)i-=e.scrollTop||0}return i};AmCharts.findIfFixed=function(t){if(t.offsetParent)for(;t=t.offsetParent;)if("fixed"==AmCharts.getStyle(t,"position"))return!0;return!1};AmCharts.findIfAuto=function(t){return t.style&&"auto"==AmCharts.getStyle(t,"overflow")?!0:t.parentNode?AmCharts.findIfAuto(t.parentNode):!1};AmCharts.findScrollLeft=function(t,e){t.scrollLeft&&(e+=t.scrollLeft);return t.parentNode?AmCharts.findScrollLeft(t.parentNode,e):e};AmCharts.findScrollTop=function(t,e){t.scrollTop&&(e+=t.scrollTop);return t.parentNode?AmCharts.findScrollTop(t.parentNode,e):e};AmCharts.formatValue=function(t,e,i,s,a,r,h,o){if(e){void 0===a&&(a="");var n;for(n=0;n<i.length;n++){var l=i[n],d=e[l];void 0!==d&&(d=r?AmCharts.addPrefix(d,o,h,s):AmCharts.formatNumber(d,s),t=t.replace(RegExp("\\[\\["+a+""+l+"\\]\\]","g"),d))}}return t};AmCharts.formatDataContextValue=function(t,e){if(t){var i=t.match(/\[\[.*?\]\]/g),s;for(s=0;s<i.length;s++){var a=i[s],a=a.substr(2,a.length-4);void 0!==e[a]&&(t=t.replace(RegExp("\\[\\["+a+"\\]\\]","g"),e[a]))}}return t};AmCharts.massReplace=function(t,e){for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];void 0===s&&(s="");t=t.replace(i,s)}return t};AmCharts.cleanFromEmpty=function(t){return t.replace(/\[\[[^\]]*\]\]/g,"")};AmCharts.addPrefix=function(t,e,i,s,a){var r=AmCharts.formatNumber(t,s),h="",o,n,l;if(0===t)return"0";0>t&&(h="-");t=Math.abs(t);if(1<t)for(o=e.length-1;-1<o;o--){if(t>=e[o].number&&(n=t/e[o].number,l=Number(s.precision),1>l&&(l=1),i=AmCharts.roundTo(n,l),l=AmCharts.formatNumber(i,{precision:-1,decimalSeparator:s.decimalSeparator,thousandsSeparator:s.thousandsSeparator}),!a||n==i)){r=h+""+l+""+e[o].prefix;break}}else for(o=0;o<i.length;o++)if(t<=i[o].number){n=t/i[o].number;l=Math.abs(Math.round(Math.log(n)*Math.LOG10E));n=AmCharts.roundTo(n,l);r=h+""+n+""+i[o].prefix;break}return r};AmCharts.remove=function(t){t&&t.remove()};AmCharts.recommended=function(){var t="js";document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")||swfobject&&swfobject.hasFlashPlayerVersion("8")&&(t="flash");return t};AmCharts.getEffect=function(t){">"==t&&(t="easeOutSine");"<"==t&&(t="easeInSine");"elastic"==t&&(t="easeOutElastic");return t};AmCharts.getObjById=function(t,e){var i,s;for(s=0;s<t.length;s++){var a=t[s];a.id==e&&(i=a)}return i};AmCharts.applyTheme=function(t,e,i){e||(e=AmCharts.theme);e&&e[i]&&AmCharts.extend(t,e[i])};AmCharts.isString=function(t){return"string"==typeof t?!0:!1};AmCharts.extend=function(t,e,i){for(var s in e)i?t.hasOwnProperty(s)||(t[s]=e[s]):t[s]=e[s];return t};AmCharts.copyProperties=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"events"!=i&&void 0!==t[i]&&"function"!=typeof t[i]&&(e[i]=t[i])};AmCharts.processObject=function(t,e,i){!1===t instanceof e&&(t=AmCharts.extend(new e(i),t));return t};AmCharts.fixNewLines=function(t){var e=RegExp("\\n","g");t&&(t=t.replace(e,"<br />"));return t};AmCharts.fixBrakes=function(t){if(AmCharts.isModern){var e=RegExp("<br>","g");t&&(t=t.replace(e,"\n"))}else t=AmCharts.fixNewLines(t);return t};AmCharts.deleteObject=function(t,e){if(t){if(void 0===e||null===e)e=20;if(0!==e)if("[object Array]"===Object.prototype.toString.call(t))for(var i=0;i<t.length;i++)AmCharts.deleteObject(t[i],e-1),t[i]=null;else try{for(i in t)t[i]&&("object"==typeof t[i]&&AmCharts.deleteObject(t[i],e-1),"function"!=typeof t[i]&&(t[i]=null))}catch(s){}}};AmCharts.bounce=function(t,e,i,s,a){return(e/=a)<1/2.75?7.5625*s*e*e+i:e<2/2.75?s*(7.5625*(e-=1.5/2.75)*e+.75)+i:e<2.5/2.75?s*(7.5625*(e-=2.25/2.75)*e+.9375)+i:s*(7.5625*(e-=2.625/2.75)*e+.984375)+i};AmCharts.easeInSine=function(t,e,i,s,a){return-s*Math.cos(e/a*(Math.PI/2))+s+i};AmCharts.easeOutSine=function(t,e,i,s,a){return s*Math.sin(e/a*(Math.PI/2))+i};AmCharts.easeOutElastic=function(t,e,i,s,a){t=1.70158;var r=0,h=s;if(0===e)return i;if(1==(e/=a))return i+s;r||(r=.3*a);h<Math.abs(s)?(h=s,t=r/4):t=r/(2*Math.PI)*Math.asin(s/h);return h*Math.pow(2,-10*e)*Math.sin(2*(e*a-t)*Math.PI/r)+s+i};AmCharts.AxisBase=AmCharts.Class({construct:function(t){this.viY=this.viX=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.valueRollOverColor="#CC0000";this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minGap=75;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;AmCharts.applyTheme(this,t,"AxisBase")},zoom:function(t,e){this.start=t;this.end=e;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var t=this.position;"H"==this.orientation?("left"==t&&(t="bottom"),"right"==t&&(t="top")):("bottom"==t&&(t="left"),"top"==t&&(t="right"));this.position=t},draw:function(){var t=this.chart;void 0===this.titleColor&&(this.titleColor=t.color);isNaN(this.titleFontSize)&&(this.titleFontSize=t.fontSize+1);this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.labels=[];var e=t.container,i=e.set();t.gridSet.push(i);this.set=i;e=e.set();t.axesLabelsSet.push(e);this.labelsSet=e;this.axisLine=new this.axisRenderer(this);this.autoGridCount&&("V"==this.orientation?(t=this.height/35,3>t&&(t=3)):t=this.width/this.minGap,this.gridCount=Math.max(t,1));this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(t){this.orientation=t?"H":"V"},addTitle:function(){var t=this.title;if(t){var e=this.chart;this.titleLabel=AmCharts.text(e.container,t,this.titleColor,e.fontFamily,this.titleFontSize,"middle",this.titleBold)}},positionTitle:function(){var t=this.titleLabel;if(t){var e,i,s=this.labelsSet,a={};0<s.length()?a=s.getBBox():(a.x=0,a.y=0,a.width=this.viW,a.height=this.viH);s.push(t);var s=a.x,r=a.y;AmCharts.VML&&(this.rotate?s-=this.x:r-=this.y);var h=a.width,a=a.height,o=this.viW,n=this.viH;t.getBBox();var l=0,d=this.titleFontSize/2,u=this.inside;switch(this.position){case"top":e=o/2;i=r-10-d;break;case"bottom":e=o/2;i=r+a+10+d;break;case"left":e=s-10-d;u&&(e-=5);i=n/2;l=-90;break;case"right":e=s+h+10+d-3,u&&(e+=7),i=n/2,l=-90}this.marginsChanged?(t.translate(e,i),this.tx=e,this.ty=i):t.translate(this.tx,this.ty);this.marginsChanged=!1;0!==l&&t.rotate(l)}},pushAxisItem:function(t,e){var i=t.graphics();0<i.length()&&(e?this.labelsSet.push(i):this.set.push(i));(i=t.getLabel())&&this.labelsSet.push(i)},addGuide:function(t){this.guides.push(t)},removeGuide:function(t){var e=this.guides,i;for(i=0;i<e.length;i++)e[i]==t&&e.splice(i,1)},handleGuideOver:function(t){clearTimeout(this.chart.hoverInt);var e=t.graphics.getBBox(),i=e.x+e.width/2,e=e.y+e.height/2,s=t.fillColor;void 0===s&&(s=t.lineColor);this.chart.showBalloon(t.balloonText,s,!0,i,e)},handleGuideOut:function(t){this.chart.hideBalloon()},addEventListeners:function(t,e){var i=this;t.mouseover(function(){i.handleGuideOver(e)});t.mouseout(function(){i.handleGuideOut(e)})},getBBox:function(){var t=this.labelsSet.getBBox();AmCharts.VML||(t={x:t.x+this.x,y:t.y+this.y,width:t.width,height:t.height});return t},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.labelsSet);var t=this.axisLine;t&&AmCharts.remove(t.set);AmCharts.remove(this.grid0)}});AmCharts.ValueAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(t){this.createEvents("axisChanged","logarithmicAxisFailed","axisSelfZoomed","axisZoomed");AmCharts.ValueAxis.base.construct.call(this,t);this.dataChanged=!0;this.gridCount=8;this.stackType="none";this.position="left";this.unitPosition="right";this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.minMaxMultiplier=1;AmCharts.applyTheme(this,t,"ValueAxis")},updateData:function(){0>=this.gridCount&&(this.gridCount=1);this.totals=[];this.data=this.chart.chartData;var t=this.chart;"xy"!=t.chartType&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&this.synchronizeWith?(AmCharts.isString(this.synchronizeWith)&&(this.synchronizeWith=t.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax())},draw:function(){AmCharts.ValueAxis.base.draw.call(this);var t=this.chart,e=this.set;"duration"==this.type&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);if(this.logarithmic&&(0>=this.getMin(0,this.data.length-1)||0>=this.minimum))this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:t});else{this.grid0=null;var i,s,a=t.dx,r=t.dy,h=!1,o=this.logarithmic,n=t.chartType;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)h=!0;else{var l=this.labelFrequency,d=this.showFirstLabel,u=this.showLastLabel,c=1,m=0,p=Math.round((this.max-this.min)/this.step)+1,f;!0===o?(f=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/f,2<f&&(p=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,m=Math.round(Math.log(this.minReal)*Math.LOG10E),p>this.gridCount&&(c=Math.ceil(p/this.gridCount)))):this.stepWidth=this.axisWidth/(this.max-this.min);var g=0;1>this.step&&-1<this.step&&(g=AmCharts.getDecimals(this.step));this.integersOnly&&(g=0);g>this.maxDecCount&&(g=this.maxDecCount);var v=this.precision;isNaN(v)||(g=v);this.max=AmCharts.roundTo(this.max,this.maxDecCount);this.min=AmCharts.roundTo(this.min,this.maxDecCount);var C={};C.precision=g;C.decimalSeparator=t.numberFormatter.decimalSeparator;C.thousandsSeparator=t.numberFormatter.thousandsSeparator;this.numberFormatter=C;var A,b=this.guides,x=b.length;if(0<x){i=this.fillAlpha;for(s=this.fillAlpha=0;s<x;s++){var y=b[s],w=NaN,M=y.above;isNaN(y.toValue)||(w=this.getCoordinate(y.toValue),A=new this.axisItemRenderer(this,w,"",!0,NaN,NaN,y),this.pushAxisItem(A,M));var N=NaN;isNaN(y.value)||(N=this.getCoordinate(y.value),A=new this.axisItemRenderer(this,N,y.label,!0,NaN,(w-N)/2,y),this.pushAxisItem(A,M));isNaN(w-N)||(A=new this.guideFillRenderer(this,N,w,y),this.pushAxisItem(A,M),A=A.graphics(),y.graphics=A,y.balloonText&&this.addEventListeners(A,y))}this.fillAlpha=i}b=!1;for(s=m;s<p;s+=c)x=AmCharts.roundTo(this.step*s+this.min,g),-1!=String(x).indexOf("e")&&(b=!0,String(x).split("e"));this.duration&&(this.maxInterval=AmCharts.getMaxInterval(this.max,this.duration));var g=this.step,S,x=this.minorGridAlpha;this.minorGridEnabled&&(S=this.getMinorGridStep(g,this.stepWidth*g));for(s=m;s<p;s+=c)if(m=g*s+this.min,m=AmCharts.roundTo(m,this.maxDecCount+1),!this.integersOnly||Math.round(m)==m)if(isNaN(v)||Number(AmCharts.toFixed(m,v))==m){!0===o&&(0===m&&(m=this.minReal),2<f&&(m=Math.pow(10,s)),b=-1!=String(m).indexOf("e")?!0:!1);this.useScientificNotation&&(b=!0);this.usePrefixes&&(b=!1);b?(A=-1==String(m).indexOf("e")?m.toExponential(15):String(m),i=A.split("e"),A=Number(i[0]),i=Number(i[1]),A=AmCharts.roundTo(A,14),10==A&&(A=1,i+=1),A=A+"e"+i,0===m&&(A="0"),1==m&&(A="1")):(o&&(A=String(m).split("."),C.precision=A[1]?A[1].length:-1),A=this.usePrefixes?AmCharts.addPrefix(m,t.prefixesOfBigNumbers,t.prefixesOfSmallNumbers,C,!0):AmCharts.formatNumber(m,C,C.precision));this.duration&&(A=AmCharts.formatDuration(m,this.duration,"",this.durationUnits,this.maxInterval,C));this.recalculateToPercents?A+="%":(i=this.unit)&&(A="left"==this.unitPosition?i+A:A+i);Math.round(s/l)!=s/l&&(A=void 0);if(0===s&&!d||s==p-1&&!u)A=" ";i=this.getCoordinate(m);this.labelFunction&&(A=this.labelFunction(m,A,this));A=new this.axisItemRenderer(this,i,A);this.pushAxisItem(A);if(m==this.baseValue&&"radar"!=n){var T,B,M=this.viW,w=this.viH;A=this.viX;y=this.viY;"H"==this.orientation?0<=i&&i<=M+1&&(T=[i,i,i+a],B=[w,0,r]):0<=i&&i<=w+1&&(T=[0,M,M+a],B=[i,i,i+r]);T&&(i=AmCharts.fitToBounds(2*this.gridAlpha,0,1),i=AmCharts.line(t.container,T,B,this.gridColor,i,1,this.dashLength),i.translate(A,y),this.grid0=i,t.axesSet.push(i),i.toBack())}if(!isNaN(S)&&0<x&&s<p-1){A=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(i=1;i<g/S;i++)y=this.getCoordinate(m+S*i),y=new this.axisItemRenderer(this,y,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(y);this.gridAlpha=A}}s=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(s=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(s=this.max);o&&s<this.minReal&&(s=this.minReal);this.baseCoord=this.getCoordinate(s);t={type:"axisChanged",target:this,chart:t};t.min=o?this.minReal:this.min;t.max=this.max;this.fire("axisChanged",t);this.axisCreated=!0}o=this.axisLine.set;t=this.labelsSet;this.positionTitle();"radar"!=n?(n=this.viX,s=this.viY,e.translate(n,s),t.translate(n,s)):o.toFront();!this.visible||h?(e.hide(),o.hide(),t.hide()):(e.show(),o.show(),t.show())}},getMinorGridStep:function(t,e){var i=[5,4,2];60>e&&i.shift();for(var s=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),a=0;a<i.length;a++){var r=t/i[a],h=Math.floor(Math.log(Math.abs(r))*Math.LOG10E);if(!(0<Math.abs(s-h)))if(1>t){if(h=Math.pow(10,-h)*r,h==Math.round(h))return r}else if(r==Math.round(r))return r}},stackGraphs:function(t){var e=this.stackType;"stacked"==e&&(e="regular");"line"==e&&(e="none");"100% stacked"==e&&(e="100%");this.stackType=e;var i=[],s=[],a=[],r=[],h,o=this.chart.graphs,n,l,d,u,c=this.baseValue,m=!1;if("line"==t||"step"==t||"smoothedLine"==t)m=!0;if(m&&("regular"==e||"100%"==e))for(u=0;u<o.length;u++)d=o[u],d.hidden||(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(n&&(d.stackGraph=n),n=d));for(n=this.start;n<=this.end;n++){var p=0;for(u=0;u<o.length;u++)if(d=o[u],!d.hidden&&(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(l=this.data[n].axes[this.id].graphs[d.id],h=l.values.value,!isNaN(h)))){var f=AmCharts.getDecimals(h);p<f&&(p=f);isNaN(r[n])?r[n]=Math.abs(h):r[n]+=Math.abs(h);r[n]=AmCharts.roundTo(r[n],p);d=d.fillToGraph;m&&d&&(d=this.data[n].axes[this.id].graphs[d.id])&&(l.values.open=d.values.value);"regular"==e&&(m&&(isNaN(i[n])?(i[n]=h,l.values.close=h,l.values.open=this.baseValue):(isNaN(h)?l.values.close=i[n]:l.values.close=h+i[n],l.values.open=i[n],i[n]=l.values.close)),"column"!=t||isNaN(h)||(l.values.close=h,0>h?(l.values.close=h,isNaN(s[n])?l.values.open=c:(l.values.close+=s[n],l.values.open=s[n]),s[n]=l.values.close):(l.values.close=h,isNaN(a[n])?l.values.open=c:(l.values.close+=a[n],l.values.open=a[n]),a[n]=l.values.close)))}}for(n=this.start;n<=this.end;n++)for(u=0;u<o.length;u++)d=o[u],d.hidden||(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(l=this.data[n].axes[this.id].graphs[d.id],h=l.values.value,isNaN(h)||(i=h/r[n]*100,l.values.percents=i,l.values.total=r[n],"100%"==e&&(isNaN(s[n])&&(s[n]=0),isNaN(a[n])&&(a[n]=0),0>i?(l.values.close=AmCharts.fitToBounds(i+s[n],-100,100),l.values.open=s[n],s[n]=l.values.close):(l.values.close=AmCharts.fitToBounds(i+a[n],-100,100),l.values.open=a[n],a[n]=l.values.close)))))},recalculate:function(){var t=this.chart.graphs,e;for(e=0;e<t.length;e++){var i=t[e];if(i.valueAxis==this){var s="value";if("candlestick"==i.type||"ohlc"==i.type)s="open";var a,r,h=this.end+2,h=AmCharts.fitToBounds(this.end+1,0,this.data.length-1),o=this.start;0<o&&o--;var n;r=this.start;i.compareFromStart&&(r=0);for(n=r;n<=h&&(r=this.data[n].axes[this.id].graphs[i.id],a=r.values[s],isNaN(a));n++);for(s=o;s<=h;s++){r=this.data[s].axes[this.id].graphs[i.id];r.percents={};var o=r.values,l;for(l in o)r.percents[l]="percents"!=l?o[l]/a*100-100:o[l]}}}},getMinMax:function(){var t=!1,e=this.chart,i=e.graphs,s;for(s=0;s<i.length;s++){var a=i[s].type;("line"==a||"step"==a||"smoothedLine"==a)&&this.expandMinMax&&(t=!0)}t&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==e.chartType&&(!0!==e.categoryAxis.parseDates||t||this.end<this.data.length-1&&this.end++);t=this.minMaxMultiplier;this.min=this.getMin(this.start,this.end);this.max=this.getMax();t=(this.max-this.min)*(t-1);this.min-=t;this.max+=t;t=this.guides.length;if(this.includeGuidesInMinMax&&0<t)for(e=0;e<t;e++)i=this.guides[e],i.toValue<this.min&&(this.min=i.toValue),i.value<this.min&&(this.min=i.value),i.toValue>this.max&&(this.max=i.toValue),i.value>this.max&&(this.max=i.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);this.min>this.max&&(t=this.max,this.max=this.min,this.min=t);isNaN(this.minTemp)||(this.min=this.minTemp);isNaN(this.maxTemp)||(this.max=this.maxTemp);this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);t=this.min;e=this.max;i=this.max-this.min;s=0===i?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E))/10;isNaN(this.maximum)&&isNaN(this.maxTemp)&&(this.max=Math.ceil(this.max/s)*s+s);isNaN(this.minimum)&&isNaN(this.minTemp)&&(this.min=Math.floor(this.min/s)*s-s);0>this.min&&0<=t&&(this.min=0);0<this.max&&0>=e&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);i=this.max-this.min;s=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E))/10;this.step=Math.ceil(i/this.gridCount/s)*s;i=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));i=this.fixStepE(i);s=Math.ceil(this.step/i);5<s&&(s=10);5>=s&&2<s&&(s=5);this.step=Math.ceil(this.step/(i*s))*i*s;1>i?(this.maxDecCount=Math.abs(Math.log(Math.abs(i))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=AmCharts.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=t&&(this.min=0);0<this.max&&0>=e&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));i=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=i);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);i=Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E;this.logarithmic&&(2<i?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(e))*Math.LOG10E))):(e=Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10,t=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E))/10,e<t&&(this.minReal=this.min=10*t)))},fixStepE:function(t){t=t.toExponential(0).split("e");var e=Number(t[1]);9==Number(t[0])&&e++;return this.generateNumber(1,e)},generateNumber:function(t,e){var i="",s;s=0>e?Math.abs(e)-1:Math.abs(e);var a;for(a=0;a<s;a++)i+="0";return 0>e?Number("0."+i+String(t)):Number(String(t)+i)},getMin:function(t,e){var i,s;for(s=t;s<=e;s++){var a=this.data[s].axes[this.id].graphs,r;for(r in a)if(a.hasOwnProperty(r)){var h=this.chart.getGraphById(r);if(h.includeInMinMax&&(!h.hidden||this.includeHidden)){isNaN(i)&&(i=Infinity);this.foundGraphs=!0;h=a[r].values;this.recalculateToPercents&&(h=a[r].percents);var o;if(this.minMaxField)o=h[this.minMaxField],o<i&&(i=o);else for(var n in h)h.hasOwnProperty(n)&&"percents"!=n&&"total"!=n&&(o=h[n],o<i&&(i=o))}}}return i},getMax:function(){var t,e;for(e=this.start;e<=this.end;e++){var i=this.data[e].axes[this.id].graphs,s;for(s in i)if(i.hasOwnProperty(s)){var a=this.chart.getGraphById(s);if(a.includeInMinMax&&(!a.hidden||this.includeHidden)){isNaN(t)&&(t=-Infinity);this.foundGraphs=!0;a=i[s].values;this.recalculateToPercents&&(a=i[s].percents);var r;if(this.minMaxField)r=a[this.minMaxField],r>t&&(t=r);else for(var h in a)a.hasOwnProperty(h)&&"percents"!=h&&"total"!=h&&(r=a[h],r>t&&(t=r))}}}return t},dispatchZoomEvent:function(t,e){var i={type:"axisZoomed",startValue:t,endValue:e,target:this,chart:this.chart};this.fire(i.type,i)},zoomToValues:function(t,e){if(e<t){var i=e;e=t;t=i}t<this.min&&(t=this.min);e>this.max&&(e=this.max);i={type:"axisSelfZoomed"};i.chart=this.chart;i.valueAxis=this;i.multiplier=this.axisWidth/Math.abs(this.getCoordinate(e)-this.getCoordinate(t));i.position="V"==this.orientation?this.reversed?this.getCoordinate(t):this.getCoordinate(e):this.reversed?this.getCoordinate(e):this.getCoordinate(t);this.fire(i.type,i)},coordinateToValue:function(t){if(isNaN(t))return NaN;var e=this.axisWidth,i=this.stepWidth,s=this.reversed,a=this.rotate,r=this.min,h=this.minReal;return!0===this.logarithmic?Math.pow(10,(a?!0===s?(e-t)/i:t/i:!0===s?t/i:(e-t)/i)+Math.log(h)*Math.LOG10E):!0===s?a?r-(t-e)/i:t/i+r:a?t/i+r:r-(t-e)/i},getCoordinate:function(t){if(isNaN(t))return NaN;var e=this.rotate,i=this.reversed,s=this.axisWidth,a=this.stepWidth,r=this.min,h=this.minReal;!0===this.logarithmic?(t=Math.log(t)*Math.LOG10E-Math.log(h)*Math.LOG10E,e=e?!0===i?s-a*t:a*t:!0===i?a*t:s-a*t):e=!0===i?e?s-a*(t-r):a*(t-r):e?a*(t-r):s-a*(t-r);e=this.rotate?e+(this.x-this.viX):e+(this.y-this.viY);return Math.round(e)},synchronizeWithAxis:function(t){this.synchronizeWith=t;this.removeListener(this.synchronizeWith,"axisChanged",this.handleSynchronization);this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(t){var e=this.synchronizeWith;t=e.min;var i=e.max,e=e.step,s=this.synchronizationMultiplier;s&&(this.min=t*s,this.max=i*s,this.step=e*s,t=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E)),t=Math.abs(Math.log(Math.abs(t))*Math.LOG10E),this.maxDecCount=t=Math.round(t),this.draw())}});AmCharts.RecAxis=AmCharts.Class({construct:function(t){var e=t.chart,i=t.axisThickness,s=t.axisColor,a=t.axisAlpha,r=t.offset,h=t.dx,o=t.dy,n=t.viX,l=t.viY,d=t.viH,u=t.viW,c=e.container;"H"==t.orientation?(s=AmCharts.line(c,[0,u],[0,0],s,a,i),this.axisWidth=t.width,"bottom"==t.position?(t=i/2+r+d+l-1,i=n):(t=-i/2-r+l+o,i=h+n)):(this.axisWidth=t.height,"right"==t.position?(s=AmCharts.line(c,[0,0,-h],[0,d,d-o],s,a,i),t=l+o,i=i/2+r+h+u+n-1):(s=AmCharts.line(c,[0,0],[0,d],s,a,i),t=l,i=-i/2-r+n));s.translate(i,t);e.axesSet.push(s);this.set=s}});AmCharts.RecItem=AmCharts.Class({construct:function(t,e,i,s,a,r,h,o,n,l){e=Math.round(e);void 0==i&&(i="");n||(n=0);void 0==s&&(s=!0);var d=t.chart.fontFamily,u=t.fontSize;

void 0==u&&(u=t.chart.fontSize);var c=t.color;void 0==c&&(c=t.chart.color);var m=t.chart.container,p=m.set();this.set=p;var f=t.axisThickness,g=t.axisColor,v=t.axisAlpha,C=t.tickLength,A=t.gridAlpha,b=t.gridThickness,x=t.gridColor,y=t.dashLength,w=t.fillColor,M=t.fillAlpha,N=t.labelsEnabled,S=t.labelRotation,T=t.counter,B=t.inside,L=t.dx,k=t.dy,D=t.orientation,O=t.position,R=t.previousCoord,I=t.viH,F=t.viW,z=t.offset,G,P;h?(N=!0,isNaN(h.tickLength)||(C=h.tickLength),void 0!=h.lineColor&&(x=h.lineColor),void 0!=h.color&&(c=h.color),isNaN(h.lineAlpha)||(A=h.lineAlpha),isNaN(h.dashLength)||(y=h.dashLength),isNaN(h.lineThickness)||(b=h.lineThickness),!0===h.inside&&(B=!0),isNaN(h.labelRotation)||(S=h.labelRotation),isNaN(h.fontSize)||(u=h.fontSize),h.position&&(O=h.position)):""===i&&(C=0);P="start";a&&(P="middle");var E=S*Math.PI/180,W,V=0,Y=0,H=0,X=W=0;"V"==D&&(S=0);var j;N&&(j=AmCharts.text(m,i,c,d,u,P,o),X=j.getBBox().width);if("H"==D){if(0<=e&&e<=F+1&&(0<C&&0<v&&e+n<=F+1&&(G=AmCharts.line(m,[e+n,e+n],[0,C],g,v,b),p.push(G)),0<A&&(P=AmCharts.line(m,[e,e+L,e+L],[I,I+k,k],x,A,b,y),p.push(P))),Y=0,V=e,h&&90==S&&(V-=u),!1===s?(P="start",Y="bottom"==O?B?Y+C:Y-C:B?Y-C:Y+C,V+=3,a&&(V+=a/2,P="middle"),0<S&&(P="middle")):P="middle",1==T&&0<M&&!h&&!l&&R<F&&(s=AmCharts.fitToBounds(e,0,F),R=AmCharts.fitToBounds(R,0,F),W=s-R,0<W&&(fill=AmCharts.rect(m,W,t.height,w,M),fill.translate(s-W+L,k),p.push(fill))),"bottom"==O?(Y+=I+u/2+z,B?0<S?(Y=I-X/2*Math.sin(E)-C-3,V+=X/2*Math.cos(E)):0>S?(Y-=C+u+3+3-X/2*Math.sin(E),V-=X/2*Math.cos(E)):Y-=C+u+3+3:0<S?(Y=I+X/2*Math.sin(E)+C+3,V-=X/2*Math.cos(E)):0>S?(Y=I+C+3-X/2*Math.sin(E)+2,V+=X/2*Math.cos(E)):Y+=C+f+3+3):(Y+=k+u/2-z,V+=L,B?0<S?(Y=X/2*Math.sin(E)+C+3,V-=X/2*Math.cos(E)):Y+=C+3:0<S?(Y=-(X/2)*Math.sin(E)-C-6,V+=X/2*Math.cos(E)):Y-=C+u+3+f+3),"bottom"==O?W=(B?I-C-1:I+f-1)+z:(H=L,W=(B?k:k-C-f+1)-z),r&&(V+=r),k=V,0<S&&(k+=X/2*Math.cos(E)),j&&(O=0,B&&(O=X/2*Math.cos(E)),k+O>F+2||0>k))j.remove(),j=null}else{0<=e&&e<=I+1&&(0<C&&0<v&&e+n<=I+1&&(G=AmCharts.line(m,[0,C],[e+n,e+n],g,v,b),p.push(G)),0<A&&(P=AmCharts.line(m,[0,L,F+L],[e,e+k,e+k],x,A,b,y),p.push(P)));P="end";if(!0===B&&"left"==O||!1===B&&"right"==O)P="start";Y=e-u/2;1==T&&0<M&&!h&&!l&&(s=AmCharts.fitToBounds(e,0,I),R=AmCharts.fitToBounds(R,0,I),E=s-R,fill=AmCharts.polygon(m,[0,t.width,t.width,0],[0,0,E,E],w,M),fill.translate(L,s-E+k),p.push(fill));Y+=u/2;"right"==O?(V+=L+F+z,Y+=k,B?(V-=C+4,r||(Y-=u/2+3)):(V+=C+4+f,Y-=2)):B?(V+=C+4-z,r||(Y-=u/2+3),h&&(V+=L,Y+=k)):(V+=-C-f-4-2-z,Y-=2);G&&("right"==O?(H+=L+z+F,W+=k,H=B?H-f:H+f):(H-=z,B||(H-=C+f)));r&&(Y+=r);B=-3;"right"==O&&(B+=k);j&&(Y>I+1||Y<B)&&(j.remove(),j=null)}G&&G.translate(H,W);!1===t.visible&&(G&&G.remove(),j&&(j.remove(),j=null));j&&(j.attr({"text-anchor":P}),j.translate(V,Y),0!==S&&j.rotate(-S,t.chart.backgroundColor),t.allLabels.push(j)," "!=i&&(this.label=j));l||(t.counter=0===T?1:0,t.previousCoord=e);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RecFill=AmCharts.Class({construct:function(t,e,i,s){var a=t.dx,r=t.dy,h=t.orientation,o=0;if(i<e){var n=e;e=i;i=n}var l=s.fillAlpha;isNaN(l)&&(l=0);n=t.chart.container;s=s.fillColor;"V"==h?(e=AmCharts.fitToBounds(e,0,t.viH),i=AmCharts.fitToBounds(i,0,t.viH)):(e=AmCharts.fitToBounds(e,0,t.viW),i=AmCharts.fitToBounds(i,0,t.viW));i-=e;isNaN(i)&&(i=4,o=2,l=0);0>i&&"object"==typeof s&&(s=s.join(",").split(",").reverse());"V"==h?(t=AmCharts.rect(n,t.width,i,s,l),t.translate(a,e-o+r)):(t=AmCharts.rect(n,i,t.height,s,l),t.translate(e-o+a,r));this.set=n.set([t])},graphics:function(){return this.set},getLabel:function(){}});AmCharts.AmChart=AmCharts.Class({construct:function(t){this.theme=t;this.version="3.3.2";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.numberFormatter={precision:-1,decimalSeparator:".",thousandsSeparator:","};this.percentFormatter={precision:2,decimalSeparator:".",thousandsSeparator:","};this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];var e=document.createElement("div"),i=e.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.chartDiv=e;e=document.createElement("div");i=e.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.legendDiv=e;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.handDrawThickness=1;this.prefixesOfBigNumbers=[{number:1e3,prefix:"k"},{number:1e6,prefix:"M"},{number:1e9,prefix:"G"},{number:1e12,prefix:"T"},{number:1e15,prefix:"P"},{number:1e18,prefix:"E"},{number:1e21,prefix:"Z"},{number:1e24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1e-24,prefix:"y"},{number:1e-21,prefix:"z"},{number:1e-18,prefix:"a"},{number:1e-15,prefix:"f"},{number:1e-12,prefix:"p"},{number:1e-9,prefix:"n"},{number:1e-6,prefix:"μ"},{number:.001,prefix:"m"}];this.panEventsEnabled=!1;AmCharts.bezierX=3;AmCharts.bezierY=6;this.product="amcharts";this.animations=[];this.balloon=new AmCharts.AmBalloon(this.theme);this.balloon.chart=this;this.type=this.chartType;AmCharts.applyTheme(this,t,"AmChart")},drawChart:function(){this.drawBackground();this.redrawLabels();this.drawTitles()},drawBackground:function(){AmCharts.remove(this.background);var t=this.container,e=this.backgroundColor,i=this.backgroundAlpha,s=this.set;AmCharts.isModern||0!==i||(i=.001);var a=this.updateWidth();this.realWidth=a;var r=this.updateHeight();this.realHeight=r;this.background=e=AmCharts.polygon(t,[0,a-1,a-1,0],[0,0,r-1,r-1],e,i,1,this.borderColor,this.borderAlpha);s.push(e);if(e=this.backgroundImage)this.path&&(e=this.path+e),this.bgImg=t=t.image(e,0,0,a,r),s.push(t)},drawTitles:function(){var t=this.titles;if(AmCharts.ifArray(t)){var e=20,i;for(i=0;i<t.length;i++){var s=t[i],a=s.color;void 0===a&&(a=this.color);var r=s.size;isNaN(s.alpha);var h=this.marginLeft,a=AmCharts.text(this.container,s.text,a,this.fontFamily,r);a.translate(h+(this.realWidth-this.marginRight-h)/2,e);h=!0;void 0!==s.bold&&(h=s.bold);h&&a.attr({"font-weight":"bold"});e+=r+6;this.freeLabelsSet.push(a)}}},write:function(t){t="object"!=typeof t?document.getElementById(t):t;t.innerHTML="";this.div=t;t.style.overflow="hidden";t.style.textAlign="left";var e=this.chartDiv,i=this.legendDiv,s=this.legend,a=i.style,r=e.style;this.measure();var h,o=document.createElement("div");h=o.style;h.position="relative";this.containerDiv=o;t.appendChild(o);var n=this.exportConfig;n&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,n));if(s)switch(s=this.addLegend(s,s.divId),s.position){case"bottom":o.appendChild(e);o.appendChild(i);break;case"top":o.appendChild(i);o.appendChild(e);break;case"absolute":h.width=t.style.width;h.height=t.style.height;a.position="absolute";r.position="absolute";void 0!==s.left&&(a.left=s.left+"px");void 0!==s.right&&(a.right=s.right+"px");void 0!==s.top&&(a.top=s.top+"px");void 0!==s.bottom&&(a.bottom=s.bottom+"px");s.marginLeft=0;s.marginRight=0;o.appendChild(e);o.appendChild(i);break;case"right":h.width=t.style.width;h.height=t.style.height;a.position="relative";r.position="absolute";o.appendChild(e);o.appendChild(i);break;case"left":h.width=t.style.width;h.height=t.style.height;a.position="absolute";r.position="relative";o.appendChild(e);o.appendChild(i);break;case"outside":o.appendChild(e)}else o.appendChild(e);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()},createLabelsSet:function(){AmCharts.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.divIsFixed=AmCharts.findIfFixed(this.chartDiv);this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;this.destroy();this.startInterval();var t=0;document.attachEvent&&!window.opera&&(t=1);this.dmouseX=this.dmouseY=0;var e=document.getElementsByTagName("html")[0];e&&window.getComputedStyle&&(e=window.getComputedStyle(e,null))&&(this.dmouseY=AmCharts.removePx(e.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(e.getPropertyValue("margin-left")));this.mouseMode=t;t=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);t.handDrawn=this.handDrawn;t.handDrawScatter=this.handDrawScatter;t.handDrawThickness=this.handDrawThickness;this.container=t;if(AmCharts.VML||AmCharts.SVG)t=this.container,this.set=t.set(),this.gridSet=t.set(),this.graphsBehindSet=t.set(),this.bulletBehindSet=t.set(),this.columnSet=t.set(),this.graphsSet=t.set(),this.trendLinesSet=t.set(),this.axesLabelsSet=t.set(),this.axesSet=t.set(),this.cursorSet=t.set(),this.scrollbarsSet=t.set(),this.bulletSet=t.set(),this.freeLabelsSet=t.set(),this.balloonsSet=t.set(),this.balloonsSet.setAttr("id","balloons"),this.zoomButtonSet=t.set(),this.linkSet=t.set(),this.brrr(),this.renderFix()},measure:function(){var t=this.div,e=this.chartDiv,i=t.offsetWidth,s=t.offsetHeight,a=this.container;t.clientHeight&&(i=t.clientWidth,s=t.clientHeight);var r=AmCharts.removePx(AmCharts.getStyle(t,"padding-left")),h=AmCharts.removePx(AmCharts.getStyle(t,"padding-right")),o=AmCharts.removePx(AmCharts.getStyle(t,"padding-top")),n=AmCharts.removePx(AmCharts.getStyle(t,"padding-bottom"));isNaN(r)||(i-=r);isNaN(h)||(i-=h);isNaN(o)||(s-=o);isNaN(n)||(s-=n);r=t.style;t=r.width;r=r.height;-1!=t.indexOf("px")&&(i=AmCharts.removePx(t));-1!=r.indexOf("px")&&(s=AmCharts.removePx(r));t=AmCharts.toCoordinate(this.width,i);r=AmCharts.toCoordinate(this.height,s);this.balloon=AmCharts.processObject(this.balloon,AmCharts.AmBalloon,this.theme);this.balloon.chart=this;if(t!=this.previousWidth||r!=this.previousHeight)e.style.width=t+"px",e.style.height=r+"px",a&&a.setSize(t,r),this.balloon.setBounds(2,2,t-2,r);this.realWidth=t;this.realHeight=r;this.divRealWidth=i;this.divRealHeight=s},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.interval&&clearInterval(this.interval);this.interval=NaN},clearTimeOuts:function(){var t=this.timeOuts;if(t){var e;for(e=0;e<t.length;e++)clearTimeout(t[e])}this.timeOuts=[]},clear:function(t){AmCharts.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));t||AmCharts.removeChart(this)},setMouseCursor:function(t){"auto"==t&&AmCharts.isNN&&(t="default");this.chartDiv.style.cursor=t;this.legendDiv.style.cursor=t},redrawLabels:function(){this.labels=[];var t=this.allLabels;this.createLabelsSet();var e;for(e=0;e<t.length;e++)this.drawLabel(t[e])},drawLabel:function(t){if(this.container){var e=t.y,i=t.text,s=t.align,a=t.size,r=t.color,h=t.rotation,o=t.alpha,n=t.bold,l=AmCharts.toCoordinate(t.x,this.realWidth),e=AmCharts.toCoordinate(e,this.realHeight);l||(l=0);e||(e=0);void 0===r&&(r=this.color);isNaN(a)&&(a=this.fontSize);s||(s="start");"left"==s&&(s="start");"right"==s&&(s="end");"center"==s&&(s="middle",h?e=this.realHeight-e+e/2:l=this.realWidth/2-l);void 0===o&&(o=1);void 0===h&&(h=0);e+=a/2;i=AmCharts.text(this.container,i,r,this.fontFamily,a,s,n,o);i.translate(l,e);0!==h&&i.rotate(h);t.url&&(i.setAttr("cursor","pointer"),i.click(function(){AmCharts.getURL(t.url)}));this.labelsSet.push(i);this.labels.push(i)}},addLabel:function(t,e,i,s,a,r,h,o,n,l){t={x:t,y:e,text:i,align:s,size:a,color:r,alpha:o,rotation:h,bold:n,url:l};this.container&&this.drawLabel(t);this.allLabels.push(t)},clearLabels:function(){var t=this.labels,e;for(e=t.length-1;0<=e;e--)t[e].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var t=this.divRealHeight,e=this.legend;if(e){var i=this.legendDiv.offsetHeight,e=e.position;if("top"==e||"bottom"==e){t-=i;if(0>t||isNaN(t))t=0;this.chartDiv.style.height=t+"px"}}return t},updateWidth:function(){var t=this.divRealWidth,e=this.divRealHeight,i=this.legend;if(i){var s=this.legendDiv,a=s.offsetWidth,r=s.offsetHeight,s=s.style,h=this.chartDiv.style,i=i.position;if("right"==i||"left"==i){t-=a;if(0>t||isNaN(t))t=0;h.width=t+"px";"left"==i?h.left=a+"px":s.left=t+"px";s.top=(e-r)/2+"px"}}return t},getTitleHeight:function(){var t=0,e=this.titles;if(0<e.length){var t=15,i;for(i=0;i<e.length;i++)t+=e[i].size+6}return t},addTitle:function(t,e,i,s,a){isNaN(e)&&(e=this.fontSize+2);t={text:t,size:e,color:i,alpha:s,bold:a};this.titles.push(t);return t},addMouseWheel:function(){var t=this;window.addEventListener&&(window.addEventListener("DOMMouseScroll",function(e){t.handleWheel.call(t,e)},!1),document.addEventListener("mousewheel",function(e){t.handleWheel.call(t,e)},!1))},handleWheel:function(t){if(this.mouseIsOver){var e=0;t||(t=window.event);t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3);e&&this.handleWheelReal(e);t.preventDefault&&t.preventDefault();t.returnValue=!1}},handleWheelReal:function(t){},addListeners:function(){var t=this,e=t.chartDiv;document.addEventListener?(t.panEventsEnabled&&"ontouchstart"in document.documentElement&&(e.addEventListener("touchstart",function(e){t.handleTouchMove.call(t,e);t.handleTouchStart.call(t,e)},!0),e.addEventListener("touchmove",function(e){t.handleTouchMove.call(t,e)},!0),e.addEventListener("touchend",function(e){t.handleTouchEnd.call(t,e)},!0)),e.addEventListener("mousedown",function(e){t.handleMouseDown.call(t,e)},!0),e.addEventListener("mouseover",function(e){t.handleMouseOver.call(t,e)},!0),e.addEventListener("mouseout",function(e){t.handleMouseOut.call(t,e)},!0)):(e.attachEvent("onmousedown",function(e){t.handleMouseDown.call(t,e)}),e.attachEvent("onmouseover",function(e){t.handleMouseOver.call(t,e)}),e.attachEvent("onmouseout",function(e){t.handleMouseOut.call(t,e)}))},dispDUpd:function(){var t;this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,t="dataUpdated",this.fire(t,{type:t,chart:this}));this.chartCreated||(t="init",this.fire(t,{type:t,chart:this}));this.chartRendered||(t="rendered",this.fire(t,{type:t,chart:this}),this.chartRendered=!0);t="drawn";this.fire(t,{type:t,chart:this})},brrr:function(){},validateSize:function(){var t=this;t.measure();var e=t.legend;if((t.realWidth!=t.previousWidth||t.realHeight!=t.previousHeight)&&0<t.realWidth&&0<t.realHeight){t.sizeChanged=!0;if(e){clearTimeout(t.legendInitTO);var i=setTimeout(function(){e.invalidateSize()},100);t.timeOuts.push(i);t.legendInitTO=i}t.marginsUpdated="xy"!=t.chartType?!1:!0;clearTimeout(t.initTO);i=setTimeout(function(){t.initChart()},150);t.timeOuts.push(i);t.initTO=i}t.renderFix();e&&e.renderFix()},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var t=this;t.marginsUpdated=!1;clearTimeout(t.validateTO);var e=setTimeout(function(){t.validateSize()},5);t.timeOuts.push(e);t.validateTO=e},validateData:function(t){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated="xy"!=this.chartType?!1:!0,this.initChart(t))},validateNow:function(){this.chartRendered=this.listenersAdded=!1;this.write(this.div)},showItem:function(t){t.hidden=!1;this.initChart()},hideItem:function(t){t.hidden=!0;this.initChart()},hideBalloon:function(){var t=this;clearInterval(t.hoverInt);clearTimeout(t.balloonTO);t.hoverInt=setTimeout(function(){t.hideBalloonReal.call(t)},t.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var t=this.balloon;t&&t.hide()},showBalloon:function(t,e,i,s,a){var r=this;clearTimeout(r.balloonTO);clearInterval(r.hoverInt);r.balloonTO=setTimeout(function(){r.showBalloonReal.call(r,t,e,i,s,a)},1)},showBalloonReal:function(t,e,i,s,a){this.handleMouseMove();var r=this.balloon;r.enabled&&(r.followCursor(!1),r.changeColor(e),!i||r.fixedPosition?(r.setPosition(s,a),r.followCursor(!1)):r.followCursor(!0),t&&r.showBalloon(t))},handleTouchMove:function(t){this.hideBalloon();var e=this.chartDiv;t.touches&&(t=t.touches.item(0),this.mouseX=t.pageX-AmCharts.findPosX(e),this.mouseY=t.pageY-AmCharts.findPosY(e))},handleMouseOver:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!1},handleMouseMove:function(t){if(this.mouseIsOver){var e=this.chartDiv;t||(t=window.event);var i,s;if(t){this.posX=AmCharts.findPosX(e);this.posY=AmCharts.findPosY(e);switch(this.mouseMode){case 1:i=t.clientX-this.posX;s=t.clientY-this.posY;if(!this.divIsFixed){var e=document.body,a,r;e&&(a=e.scrollLeft,y1=e.scrollTop);if(e=document.documentElement)r=e.scrollLeft,y2=e.scrollTop;a=Math.max(a,r);r=Math.max(y1,y2);i+=a;s+=r}break;case 0:this.divIsFixed?(i=t.clientX-this.posX,s=t.clientY-this.posY):(i=t.pageX-this.posX,s=t.pageY-this.posY)}t.touches&&(t=t.touches.item(0),i=t.pageX-this.posX,s=t.pageY-this.posY);this.mouseX=i-this.dmouseX;this.mouseY=s-this.dmouseY}}},handleTouchStart:function(t){this.handleMouseDown(t)},handleTouchEnd:function(t){AmCharts.resetMouseOver();this.handleReleaseOutside(t)},handleReleaseOutside:function(t){},handleMouseDown:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!0;t&&t.preventDefault&&t.preventDefault()},addLegend:function(t,e){t=AmCharts.processObject(t,AmCharts.AmLegend,this.theme);t.divId=e;var i;i="object"!=typeof e?document.getElementById(e):e;this.legend=t;t.chart=this;i?(t.div=i,t.position="outside",t.autoMargins=!1):t.div=this.legendDiv;i=this.handleLegendEvent;this.listenTo(t,"showItem",i);this.listenTo(t,"hideItem",i);this.listenTo(t,"clickMarker",i);this.listenTo(t,"rollOverItem",i);this.listenTo(t,"rollOutItem",i);this.listenTo(t,"rollOverMarker",i);this.listenTo(t,"rollOutMarker",i);this.listenTo(t,"clickLabel",i);return t},removeLegend:function(){this.legend=void 0;this.legendDiv.innerHTML=""},handleResize:function(){(AmCharts.isPercents(this.width)||AmCharts.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},getSVG:function(){if(AmCharts.hasSVG)return this.container},animate:function(t,e,i,s,a,r,h){t["an_"+e]&&AmCharts.removeFromArray(this.animations,t["an_"+e]);i={obj:t,frame:0,attribute:e,from:i,to:s,time:a,effect:r,suffix:h};t["an_"+e]=i;this.animations.push(i);return i},setLegendData:function(t){var e=this.legend;e&&e.setData(t)},startInterval:function(){var t=this;clearInterval(t.interval);t.interval=setInterval(function(){t.updateAnimations.call(t)},AmCharts.updateRate)},stopAnim:function(t){AmCharts.removeFromArray(this.animations,t)},updateAnimations:function(){var t;this.container&&this.container.update();for(t=this.animations.length-1;0<=t;t--){var e=this.animations[t],i=1e3*e.time/AmCharts.updateRate,s=e.frame+1,a=e.obj,r=e.attribute;if(s<=i){e.frame++;var h=Number(e.from),o=Number(e.to)-h,i=AmCharts[e.effect](0,s,h,o,i);0===o?this.animations.splice(t,1):a.node.style[r]=i+e.suffix}else a.node.style[r]=Number(e.to)+e.suffix,this.animations.splice(t,1)}}});AmCharts.Slice=AmCharts.Class({construct:function(){}});AmCharts.SerialDataItem=AmCharts.Class({construct:function(){}});AmCharts.GraphDataItem=AmCharts.Class({construct:function(){}});AmCharts.Guide=AmCharts.Class({construct:function(){}});AmCharts.AmGraph=AmCharts.Class({construct:function(t){this.className="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=0;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.hideBulletsCount=this.bulletOffset=0;this.labelPosition="top";this.cornerRadiusTop=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.y=this.x=0;AmCharts.applyTheme(this,t,"AmGraph")},draw:function(){var t=this.chart,e=t.container;this.container=e;this.destroy();var i=e.set(),s=e.set();this.behindColumns?(t.graphsBehindSet.push(i),t.bulletBehindSet.push(s)):(t.graphsSet.push(i),t.bulletSet.push(s));var a=this.bulletAxis;AmCharts.isString(a)&&(this.bulletAxis=t.getValueAxisById(a));this.bulletSet=s;this.scrollbar||(a=t.marginLeftReal,t=t.marginTopReal,i.translate(a,t),s.translate(a,t));e=e.set();AmCharts.remove(this.columnsSet);i.push(e);this.set=i;this.columnsSet=e;this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];AmCharts.ifArray(this.data)&&(i=!1,"xy"==this.chartType?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(i=!0):this.valueAxis.axisCreated&&(i=!0),!this.hidden&&i&&this.createGraph())},createGraph:function(){var t=this,e=t.chart;"inside"==t.labelPosition&&"column"!=t.type&&(t.labelPosition="bottom");t.startAlpha=e.startAlpha;t.seqAn=e.sequencedAnimation;t.baseCoord=t.valueAxis.baseCoord;t.fillColors||(t.fillColors=t.lineColor);void 0===t.fillAlphas&&(t.fillAlphas=0);void 0===t.bulletColor&&(t.bulletColor=t.lineColor,t.bulletColorNegative=t.negativeLineColor);void 0===t.bulletAlpha&&(t.bulletAlpha=t.lineAlpha);clearTimeout(t.playedTO);if(!isNaN(t.valueAxis.min)&&!isNaN(t.valueAxis.max)){switch(t.chartType){case"serial":t.createSerialGraph();"candlestick"==t.type&&1>t.valueAxis.minMaxMultiplier&&t.positiveClip(t.set);break;case"radar":t.createRadarGraph();break;case"xy":t.createXYGraph(),t.positiveClip(t.set)}t.playedTO=setTimeout(function(){t.setAnimationPlayed.call(t)},500*t.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var t=[],e=[],i=this.xAxis,s=this.yAxis;this.pmh=s.viH+1;this.pmw=i.viW+1;this.pmy=this.pmx=0;var a;for(a=this.start;a<=this.end;a++){var r=this.data[a].axes[i.id].graphs[this.id],h=r.values,o=h.x,n=h.y,h=i.getCoordinate(o),l=s.getCoordinate(n);!isNaN(o)&&!isNaN(n)&&(t.push(h),e.push(l),(o=this.createBullet(r,h,l,a))||(o=0),n=this.labelText)&&(r=this.createLabel(r,h,l,n),this.allBullets.push(r),this.positionLabel(h,l,r,this.labelPosition,o))}this.drawLineGraph(t,e);this.launchAnimation()},createRadarGraph:function(){var t=this.valueAxis.stackType,e=[],i=[],s,a,r;for(r=this.start;r<=this.end;r++){var h=this.data[r].axes[this.valueAxis.id].graphs[this.id],o;o="none"==t||"3d"==t?h.values.value:h.values.close;if(isNaN(o))this.drawLineGraph(e,i),e=[],i=[];else{var n=this.y-(this.valueAxis.getCoordinate(o)-this.height),l=180-360/(this.end-this.start+1)*r;o=n*Math.sin(l/180*Math.PI);n*=Math.cos(l/180*Math.PI);e.push(o);i.push(n);(l=this.createBullet(h,o,n,r))||(l=0);var d=this.labelText;d&&(h=this.createLabel(h,o,n,d),this.allBullets.push(h),this.positionLabel(o,n,h,this.labelPosition,l));isNaN(s)&&(s=o);isNaN(a)&&(a=n)}}e.push(s);i.push(a);this.drawLineGraph(e,i);this.launchAnimation()},positionLabel:function(t,e,i,s,a){var r=i.getBBox();switch(s){case"left":t-=(r.width+a)/2+2;break;case"top":e-=(a+r.height)/2+1;break;case"right":t+=(r.width+a)/2+2;break;case"bottom":e+=(a+r.height)/2+1}i.translate(t,e)},getGradRotation:function(){var t=270;"horizontal"==this.gradientOrientation&&(t=0);return this.gradientRotation=t},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var t=this.chart,e=this.id,i=this.index,s=this.data,a=this.chart.container,r=this.valueAxis,h=this.type,o=this.columnWidthReal;isNaN(this.columnWidth)||(o=this.columnWidth);isNaN(o)&&(o=.8);var n=this.width,l=this.height,d=this.y,u=this.rotate,c=this.columnCount,m=AmCharts.toCoordinate(this.cornerRadiusTop,o/2),p=this.connect,f=[],g=[],v,C,A,b,x=this.chart.graphs.length,y,w=this.dx/this.depthCount,M=this.dy/this.depthCount,N=r.stackType,S=this.labelPosition,T=this.start,B=this.end,L=this.scrollbar,k=this.categoryAxis,D=this.baseCoord,O=this.negativeBase,R=this.columnIndex,I=this.lineThickness,F=this.lineAlpha,z=this.lineColor,G=this.dashLength,P=this.set,E=S,W=this.getGradRotation(),V=this.chart.columnSpacing,Y=k.cellWidth,H=(Y*o-c)/c;V>H&&(V=H);var X,j,U,Z=l+1,q=n+1,_=0,K=0,Q,J,$,tt,et=this.fillColors,it=this.negativeFillColors,st=this.negativeLineColor,at=this.fillAlphas,rt=this.negativeFillAlphas;"object"==typeof at&&(at=at[0]);"object"==typeof rt&&(rt=rt[0]);var ht=r.getCoordinate(r.min);r.logarithmic&&(ht=r.getCoordinate(r.minReal));this.minCoord=ht;this.resetBullet&&(this.bullet="none");if(!L&&("line"==h||"smoothedLine"==h||"step"==h)&&(1==s.length&&"step"!=h&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),it||void 0!=st)){var ot=O;ot>r.max&&(ot=r.max);ot<r.min&&(ot=r.min);r.logarithmic&&(ot=r.minReal);var nt=r.getCoordinate(ot),lt=r.getCoordinate(r.max);u?(Z=l,q=Math.abs(lt-nt),Q=l,J=Math.abs(ht-nt),tt=K=0,r.reversed?(_=0,$=nt):(_=nt,$=0)):(q=n,Z=Math.abs(lt-nt),J=n,Q=Math.abs(ht-nt),$=_=0,r.reversed?(tt=d,K=nt):tt=nt+1)}var dt=Math.round;this.pmx=dt(_);this.pmy=dt(K);this.pmh=dt(Z);this.pmw=dt(q);this.nmx=dt($);this.nmy=dt(tt);this.nmh=dt(Q);this.nmw=dt(J);AmCharts.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);o="column"==h?(Y*o-V*(c-1))/c:Y*o;1>o&&(o=1);var ut;if("line"==h||"step"==h||"smoothedLine"==h){if(0<T){for(ut=T-1;-1<ut;ut--)if(X=s[ut],j=X.axes[r.id].graphs[e],U=j.values.value,!isNaN(U)){T=ut;break}if(this.lineColorField)for(ut=T;-1<ut;ut--)if(X=s[ut],j=X.axes[r.id].graphs[e],j.lineColor){this.bulletColorSwitched=this.lineColorSwitched=j.lineColor;break}if(this.fillColorsField)for(ut=T;-1<ut;ut--)if(X=s[ut],j=X.axes[r.id].graphs[e],j.fillColors){this.fillColorsSwitched=j.fillColors;break}if(this.dashLengthField)for(ut=T;-1<ut;ut--)if(X=s[ut],j=X.axes[r.id].graphs[e],!isNaN(j.dashLength)){this.dashLengthSwitched=j.dashLength;break}}if(B<s.length-1)for(ut=B+1;ut<s.length;ut++)if(X=s[ut],j=X.axes[r.id].graphs[e],U=j.values.value,!isNaN(U)){B=ut;break}}B<s.length-1&&B++;var ct=[],mt=[],pt=!1;if("line"==h||"step"==h||"smoothedLine"==h)if(this.stackable&&"regular"==N||"100%"==N||this.fillToGraph)pt=!0;var ft=this.noStepRisers;for(ut=T;ut<=B;ut++){X=s[ut];j=X.axes[r.id].graphs[e];j.index=ut;var gt,vt,Ct,At,bt=NaN,xt=NaN,yt=NaN,wt=NaN,Mt=NaN,Nt=NaN,St=NaN,Tt=NaN,Bt=NaN,Lt=NaN,kt=NaN,Dt=NaN,Ot=NaN,Rt=NaN,It=NaN,Ft=NaN,zt=NaN,Gt=void 0,Pt=et,Et=at,Wt=z,Vt,Yt,Ht=this.pattern;void 0!=j.pattern&&(Ht=j.pattern);void 0!=j.color&&(Pt=j.color);j.fillColors&&(Pt=j.fillColors);isNaN(j.alpha)||(Et=j.alpha);isNaN(j.dashLength)||(G=j.dashLength);var Xt=j.values;r.recalculateToPercents&&(Xt=j.percents);if(Xt){Rt=this.stackable&&"none"!=N&&"3d"!=N?Xt.close:Xt.value;if("candlestick"==h||"ohlc"==h)Rt=Xt.close,Ft=Xt.low,St=r.getCoordinate(Ft),It=Xt.high,Bt=r.getCoordinate(It);zt=Xt.open;yt=r.getCoordinate(Rt);isNaN(zt)||(Mt=r.getCoordinate(zt));if(!L)switch(this.showBalloonAt){case"close":j.y=yt;break;case"open":j.y=Mt;break;case"high":j.y=Bt;break;case"low":j.y=St}var bt=X.x[k.id],jt=this.periodSpan-1,Ut=Math.floor(Y/2)+jt*Math.floor(Y/2),Zt=Ut;"start"==this.pointPosition&&(bt-=Y/2,Ut=0,Zt=Math.floor(Y)+jt*Math.floor(Y));"end"==this.pointPosition&&(bt+=Y/2,Ut=Math.floor(Y)+jt*Math.floor(Y),Zt=0);if(ft){var qt=this.columnWidth;isNaN(qt)||(Ut*=qt,Zt*=qt)}L||(j.x=bt);-1e5>bt&&(bt=-1e5);bt>n+1e5&&(bt=n+1e5);u?(xt=yt,wt=Mt,Mt=yt=bt,isNaN(zt)&&!this.fillToGraph&&(wt=D),Nt=St,Tt=Bt):(wt=xt=bt,isNaN(zt)&&!this.fillToGraph&&(Mt=D));Rt<zt&&(j.isNegative=!0,it&&(Pt=it),rt&&(Et=rt),void 0!=st&&(Wt=st));switch(h){case"line":isNaN(Rt)?p||(this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]):(j.isNegative=Rt<O?!0:!1,f.push(xt),g.push(yt),Lt=xt,kt=yt,Dt=xt,Ot=yt,!pt||isNaN(Mt)||isNaN(wt)||(ct.push(wt),mt.push(Mt)),void 0==j.lineColor&&void 0==j.fillColors&&isNaN(j.dashLength)||(this.drawLineGraph(f,g,ct,mt),f=[xt],g=[yt],ct=[],mt=[],this.lineColorSwitched=j.lineColor,this.fillColorsSwitched=j.fillColors,this.dashLengthSwitched=j.dashLength));break;case"smoothedLine":isNaN(Rt)?p||(this.drawSmoothedGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]):(j.isNegative=Rt<O?!0:!1,f.push(xt),g.push(yt),Lt=xt,kt=yt,Dt=xt,Ot=yt,!pt||isNaN(Mt)||isNaN(wt)||(ct.push(wt),mt.push(Mt)),void 0==j.lineColor&&void 0==j.fillColors&&isNaN(j.dashLength)||(this.drawSmoothedGraph(f,g,ct,mt),f=[xt],g=[yt],ct=[],mt=[],this.lineColorSwitched=j.lineColor,this.fillColorsSwitched=j.fillColors,this.dashLengthSwitched=j.dashLength));break;case"step":isNaN(Rt)?p||(v=C=NaN,this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]):(j.isNegative=Rt<O?!0:!1,void 0==j.lineColor&&void 0==j.fillColors&&isNaN(j.dashLength)||(this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[],this.lineColorSwitched=j.lineColor,this.fillColorsSwitched=j.fillColors,this.dashLengthSwitched=j.dashLength),u?(isNaN(v)||(f.push(v),g.push(yt-Ut)),g.push(yt-Ut),f.push(xt),g.push(yt+Zt),f.push(xt),!pt||isNaN(Mt)||isNaN(wt)||(ct.push(A),mt.push(Mt-Ut),ct.push(wt),mt.push(Mt-Ut),ct.push(wt),mt.push(Mt+Zt))):(isNaN(C)||(g.push(C),f.push(v),g.push(C),f.push(xt-Ut)),f.push(xt-Ut),g.push(yt),f.push(xt+Zt),g.push(yt),!pt||isNaN(Mt)||isNaN(wt)||(ct.push(wt-Ut),mt.push(b),ct.push(wt-Ut),mt.push(Mt),ct.push(wt+Zt),mt.push(Mt))),v=xt,C=yt,A=wt,b=Mt,Lt=xt,kt=yt,Dt=xt,Ot=yt,ft&&(v=C=NaN,this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]));break;case"column":Vt=Wt;void 0!=j.lineColor&&(Vt=j.lineColor);if(!isNaN(Rt)){Rt<O?(j.isNegative=!0,it&&(Pt=it),void 0!=st&&(Vt=st)):j.isNegative=!1;var _t=r.min,Kt=r.max;if(!(Rt<_t&&zt<_t||Rt>Kt&&zt>Kt))if(u){"3d"==N?(vt=yt-.5*(o+V)+V/2+M*R,gt=wt+w*R):(vt=yt-(c/2-R)*(o+V)+V/2,gt=wt);Ct=o;Lt=xt;kt=vt+o/2;Dt=xt;Ot=vt+o/2;vt+Ct>l&&(Ct=l-vt);0>vt&&(Ct+=vt,vt=0);At=xt-wt;var Qt=gt;gt=AmCharts.fitToBounds(gt,0,n);At+=Qt-gt;At=AmCharts.fitToBounds(At,-gt,n-gt+w*R);if(vt<l&&0<Ct&&(Gt=new AmCharts.Cuboid(a,At,Ct,w-t.d3x,M-t.d3y,Pt,Et,I,Vt,F,W,m,u,G,Ht),"bottom"!=S&&"inside"!=S&&"middle"!=S))if(S=r.reversed?"left":"right",0>Rt)S=r.reversed?"right":"left";else if("regular"==N||"100%"==N)Lt+=this.dx}else{"3d"==N?(gt=xt-.5*(o+V)+V/2+w*R,vt=Mt+M*R):(gt=xt-(c/2-R)*(o+V)+V/2,vt=Mt);Ct=o;Lt=gt+o/2;kt=yt;Dt=gt+o/2;Ot=yt;gt+Ct>n+R*w&&(Ct=n-gt+R*w);0>gt&&(Ct+=gt,gt=0);At=yt-Mt;var Jt=vt;vt=AmCharts.fitToBounds(vt,this.dy,l);At+=Jt-vt;At=AmCharts.fitToBounds(At,-vt+M*R,l-vt);if(gt<n+R*w&&0<Ct)if(Gt=new AmCharts.Cuboid(a,Ct,At,w-t.d3x,M-t.d3y,Pt,Et,I,Vt,this.lineAlpha,W,m,u,G,Ht),0>Rt&&"middle"!=S&&"inside"!=S)S="bottom";else if(S=E,"regular"==N||"100%"==N)kt+=this.dy}if(Gt&&(Yt=Gt.set,Yt.translate(gt,vt),this.columnsSet.push(Yt),(j.url||this.showHandOnHover)&&Yt.setAttr("cursor","pointer"),!L)){"none"==N&&(y=u?(this.end+1-ut)*x-i:x*ut+i);"3d"==N&&(u?(y=(x-i)*(this.end+1-ut),Lt+=w*this.columnIndex,Dt+=w*this.columnIndex,j.y+=w*this.columnIndex):(y=(x-i)*(ut+1),Lt+=3,kt+=M*this.columnIndex+7,Ot+=M*this.columnIndex,j.y+=M*this.columnIndex));if("regular"==N||"100%"==N)"inside"!=S&&(S="middle"),y=u?0<Xt.value?(this.end+1-ut)*x+i:(this.end+1-ut)*x-i:0<Xt.value?x*ut+i:x*ut-i;this.columnsArray.push({column:Gt,depth:y});j.x=u?vt+Ct/2:gt+Ct/2;this.ownColumns.push(Gt);this.animateColumns(Gt,ut,xt,wt,yt,Mt);this.addListeners(Yt,j)}}break;case"candlestick":if(!isNaN(zt)&&!isNaN(Rt)){var $t,te;Vt=Wt;void 0!=j.lineColor&&(Vt=j.lineColor);if(u){if(vt=yt-o/2,gt=wt,Ct=o,vt+Ct>l&&(Ct=l-vt),0>vt&&(Ct+=vt,vt=0),vt<l&&0<Ct){var ee,ie;Rt>zt?(ee=[xt,Tt],ie=[wt,Nt]):(ee=[wt,Tt],ie=[xt,Nt]);!isNaN(Tt)&&!isNaN(Nt)&&yt<l&&0<yt&&($t=AmCharts.line(a,ee,[yt,yt],Vt,F,I),te=AmCharts.line(a,ie,[yt,yt],Vt,F,I));At=xt-wt;Gt=new AmCharts.Cuboid(a,At,Ct,w,M,Pt,at,I,Vt,F,W,m,u,G)}}else if(gt=xt-o/2,vt=Mt+I/2,Ct=o,gt+Ct>n&&(Ct=n-gt),0>gt&&(Ct+=gt,gt=0),At=yt-Mt,gt<n&&0<Ct){
var Gt=new AmCharts.Cuboid(a,Ct,At,w,M,Pt,Et,I,Vt,F,W,m,u,G),se,ae;Rt>zt?(se=[yt,Bt],ae=[Mt,St]):(se=[Mt,Bt],ae=[yt,St]);!isNaN(Bt)&&!isNaN(St)&&xt<n&&0<xt&&($t=AmCharts.line(a,[xt,xt],se,Vt,F,I),te=AmCharts.line(a,[xt,xt],ae,Vt,F,I))}Gt&&(Yt=Gt.set,P.push(Yt),Yt.translate(gt,vt-I/2),(j.url||this.showHandOnHover)&&Yt.setAttr("cursor","pointer"),$t&&(P.push($t),P.push(te)),Lt=xt,kt=yt,Dt=xt,Ot=yt,L||(j.x=u?vt+Ct/2:gt+Ct/2,this.animateColumns(Gt,ut,xt,wt,yt,Mt),this.addListeners(Yt,j)))}break;case"ohlc":if(!(isNaN(zt)||isNaN(It)||isNaN(Ft)||isNaN(Rt))){Rt<zt&&(j.isNegative=!0,void 0!=st&&(Wt=st));var re,he,oe;if(u){var ne=yt-o/2,ne=AmCharts.fitToBounds(ne,0,l),le=AmCharts.fitToBounds(yt,0,l),de=yt+o/2,de=AmCharts.fitToBounds(de,0,l);he=AmCharts.line(a,[wt,wt],[ne,le],Wt,F,I,G);0<yt&&yt<l&&(re=AmCharts.line(a,[Nt,Tt],[yt,yt],Wt,F,I,G));oe=AmCharts.line(a,[xt,xt],[le,de],Wt,F,I,G)}else{var ue=xt-o/2,ue=AmCharts.fitToBounds(ue,0,n),ce=AmCharts.fitToBounds(xt,0,n),me=xt+o/2,me=AmCharts.fitToBounds(me,0,n);he=AmCharts.line(a,[ue,ce],[Mt,Mt],Wt,F,I,G);0<xt&&xt<n&&(re=AmCharts.line(a,[xt,xt],[St,Bt],Wt,F,I,G));oe=AmCharts.line(a,[ce,me],[yt,yt],Wt,F,I,G)}P.push(he);P.push(re);P.push(oe);Lt=xt;kt=yt;Dt=xt;Ot=yt}}if(!L&&!isNaN(Rt)){var pe=this.hideBulletsCount;if(this.end-this.start<=pe||0===pe){var fe=this.createBullet(j,Dt,Ot,ut);fe||(fe=0);var ge=this.labelText;if(ge){var ve=this.createLabel(j,0,0,ge),Ce=0,Ae=0,be=ve.getBBox(),xe=be.width,ye=be.height;switch(S){case"left":Ce=-(xe/2+fe/2+3);break;case"top":Ae=-(ye/2+fe/2+3);break;case"right":Ce=fe/2+2+xe/2;break;case"bottom":u&&"column"==h?(Lt=D,0>Rt?(Ce=-6,ve.attr({"text-anchor":"end"})):(Ce=6,ve.attr({"text-anchor":"start"}))):(Ae=fe/2+ye/2,ve.x=-(xe/2+2));break;case"middle":"column"==h&&(u?(Ae=-(ye/2)+this.fontSize/2,Ce=-(xt-wt)/2-w,0>At&&(Ce+=w),Math.abs(xt-wt)<xe&&!this.showAllValueLabels&&(ve.remove(),ve=null)):(Ae=-(yt-Mt)/2,0>At&&(Ae-=M),Math.abs(yt-Mt)<ye&&!this.showAllValueLabels&&(ve.remove(),ve=null)));break;case"inside":u?(Ae=-(ye/2)+this.fontSize/2,Ce=0>At?xe:-xe):Ae=0>At?ye:-ye}if(ve){if(isNaN(kt)||isNaN(Lt))ve.remove(),ve=null;else if(Lt+=Ce,kt+=Ae,ve.translate(Lt,kt),u){if(0>kt||kt>l)ve.remove(),ve=null}else{var we=0;"3d"==N&&(we=w*R);if(0>Lt||Lt>n+we)ve.remove(),ve=null}ve&&this.allBullets.push(ve)}}if("regular"==N||"100%"==N){var Me=r.totalText;if(Me){var Ne=this.createLabel(j,0,0,Me,r.totalTextColor);this.allBullets.push(Ne);var Se=Ne.getBBox(),Te=Se.width,Be=Se.height,Le,ke,De=r.totals[ut];De&&De.remove();var Oe=0;"column"!=h&&(Oe=fe);u?(ke=yt,Le=0>Rt?xt-Te/2-2-Oe:xt+Te/2+3+Oe):(Le=xt,ke=0>Rt?yt+Be/2+Oe:yt-Be/2-3-Oe);Ne.translate(Le,ke);r.totals[ut]=Ne;u?(0>ke||ke>l)&&Ne.remove():(0>Le||Le>n)&&Ne.remove()}}}}}}if("line"==h||"step"==h||"smoothedLine"==h)"smoothedLine"==h?this.drawSmoothedGraph(f,g,ct,mt):this.drawLineGraph(f,g,ct,mt),L||this.launchAnimation();this.bulletsHidden&&this.hideBullets()},animateColumns:function(t,e,i,s,a,r){var h=this;i=h.chart.startDuration;0<i&&!h.animationPlayed&&(h.seqAn?(t.set.hide(),h.animationArray.push(t),t=setTimeout(function(){h.animate.call(h)},i/(h.end-h.start+1)*(e-h.start)*1e3),h.timeOuts.push(t)):h.animate(t))},createLabel:function(t,e,i,s,a){var r=this.chart,h=t.labelColor;h||(h=this.color);h||(h=r.color);a&&(h=a);a=this.fontSize;void 0===a&&(this.fontSize=a=r.fontSize);t=r.formatString(s,t,this);t=AmCharts.cleanFromEmpty(t);r=AmCharts.text(this.container,t,h,r.fontFamily,a);r.translate(e,i);this.bulletSet.push(r);return r},positiveClip:function(t){t.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(t){t.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(t,e,i,s){var a=this;if(1<t.length){var r=a.set,h=a.container,o=h.set(),n=h.set();r.push(n);r.push(o);var l=a.lineAlpha,d=a.lineThickness,r=a.fillAlphas,u=a.lineColor,c=a.negativeLineAlpha;isNaN(c)&&(c=l);var m=a.lineColorSwitched;m&&(u=m);var m=a.fillColors,p=a.fillColorsSwitched;p&&(m=p);var f=a.dashLength;(p=a.dashLengthSwitched)&&(f=p);var p=a.negativeLineColor,g=a.negativeFillColors,v=a.negativeFillAlphas,C=a.baseCoord;0!==a.negativeBase&&(C=a.valueAxis.getCoordinate(a.negativeBase));l=AmCharts.line(h,t,e,u,l,d,f,!1,!0);o.push(l);o.click(function(){a.handleGraphClick()});void 0!==p&&(d=AmCharts.line(h,t,e,p,c,d,f,!1,!0),n.push(d));if(0<r||0<v)if(d=t.join(";").split(";"),c=e.join(";").split(";"),"serial"==a.chartType&&(0<i.length?(i.reverse(),s.reverse(),d=t.concat(i),c=e.concat(s)):a.rotate?(c.push(c[c.length-1]),d.push(C),c.push(c[0]),d.push(C),c.push(c[0]),d.push(d[0])):(d.push(d[d.length-1]),c.push(C),d.push(d[0]),c.push(C),d.push(t[0]),c.push(c[0]))),t=a.gradientRotation,0<r&&(e=AmCharts.polygon(h,d,c,m,r,1,"#000",0,t),e.pattern(a.pattern),o.push(e)),g||void 0!==p)isNaN(v)&&(v=r),g||(g=p),h=AmCharts.polygon(h,d,c,g,v,1,"#000",0,t),h.pattern(a.pattern),n.push(h),n.click(function(){a.handleGraphClick()});a.applyMask(n,o)}},applyMask:function(t,e){var i=t.length();"serial"!=this.chartType||this.scrollbar||(this.positiveClip(e),0<i&&this.negativeClip(t))},drawSmoothedGraph:function(t,e,i,s){if(1<t.length){var a=this.set,r=this.container,h=r.set(),o=r.set();a.push(o);a.push(h);var n=this.lineAlpha,l=this.lineThickness,a=this.dashLength,d=this.fillAlphas,u=this.lineColor,c=this.fillColors,m=this.negativeLineColor,p=this.negativeFillColors,f=this.negativeFillAlphas,g=this.baseCoord,v=this.lineColorSwitched;v&&(u=v);(v=this.fillColorsSwitched)&&(c=v);v=this.negativeLineAlpha;isNaN(v)&&(v=n);n=new AmCharts.Bezier(r,t,e,u,n,l,c,0,a);h.push(n.path);void 0!==m&&(l=new AmCharts.Bezier(r,t,e,m,v,l,c,0,a),o.push(l.path));0<d&&(n=t.join(";").split(";"),u=e.join(";").split(";"),l="",0<i.length?(i.push("M"),s.push("M"),i.reverse(),s.reverse(),n=t.concat(i),u=e.concat(s)):(this.rotate?(l+=" L"+g+","+e[e.length-1],l+=" L"+g+","+e[0]):(l+=" L"+t[t.length-1]+","+g,l+=" L"+t[0]+","+g),l+=" L"+t[0]+","+e[0]),i=new AmCharts.Bezier(r,n,u,NaN,0,0,c,d,a,l),i.path.pattern(this.pattern),h.push(i.path),p||void 0!==m)&&(f||(f=d),p||(p=m),t=new AmCharts.Bezier(r,t,e,NaN,0,0,p,f,a,l),t.path.pattern(this.pattern),o.push(t.path));this.applyMask(o,h)}},launchAnimation:function(){var t=this,e=t.chart.startDuration;if(0<e&&!t.animationPlayed){var i=t.set,s=t.bulletSet;AmCharts.VML||(i.attr({opacity:t.startAlpha}),s.attr({opacity:t.startAlpha}));i.hide();s.hide();t.seqAn?(e=setTimeout(function(){t.animateGraphs.call(t)},t.index*e*1e3),t.timeOuts.push(e)):t.animateGraphs()}},animateGraphs:function(){var t=this.chart,e=this.set,i=this.bulletSet,s=this.x,a=this.y;e.show();i.show();var r=t.startDuration,t=t.startEffect;e&&(this.rotate?(e.translate(-1e3,a),i.translate(-1e3,a)):(e.translate(s,-1e3),i.translate(s,-1e3)),e.animate({opacity:1,translate:s+","+a},r,t),i.animate({opacity:1,translate:s+","+a},r,t))},animate:function(t){var e=this.chart,i=this.animationArray;!t&&0<i.length&&(t=i[0],i.shift());i=AmCharts[AmCharts.getEffect(e.startEffect)];e=e.startDuration;t&&(this.rotate?t.animateWidth(e,i):t.animateHeight(e,i),t.set.show())},legendKeyColor:function(){var t=this.legendColor,e=this.lineAlpha;void 0===t&&(t=this.lineColor,0===e&&(e=this.fillColors)&&(t="object"==typeof e?e[0]:e));return t},legendKeyAlpha:function(){var t=this.legendAlpha;void 0===t&&(t=this.lineAlpha,0===t&&this.fillAlphas&&(t=this.fillAlphas),0===t&&(t=this.bulletAlpha),0===t&&(t=1));return t},createBullet:function(t,e,i,s){s=this.container;var a=this.bulletOffset,r=this.bulletSize;isNaN(t.bulletSize)||(r=t.bulletSize);var h=t.values.value;isNaN(this.maxValue)||isNaN(h)||(r=h/this.maxValue*this.maxBulletSize);var o=r;this.bulletAxis&&(r=t.values.error,isNaN(r)||(h=r),r=this.bulletAxis.stepWidth*h);r<this.minBulletSize&&(r=this.minBulletSize);this.rotate?e+=a:i-=a;var n,l=this.bulletColor;t.lineColor&&(this.bulletColorSwitched=t.lineColor);this.bulletColorSwitched&&(l=this.bulletColorSwitched);t.isNegative&&void 0!==this.bulletColorNegative&&(l=this.bulletColorNegative);void 0!==t.color&&(l=t.color);a=this.bullet;t.bullet&&(a=t.bullet);var h=this.bulletBorderThickness,d=this.bulletBorderColor,u=this.bulletBorderAlpha,c=this.bulletAlpha;d||(d=l);var m=t.alpha;isNaN(m)||(c=m);if("none"!=this.bullet||t.bullet)n=AmCharts.bullet(s,a,r,l,c,h,d,u,o);if(this.customBullet||t.customBullet)o=this.customBullet,t.customBullet&&(o=t.customBullet),o&&(n&&n.remove(),"function"==typeof o?(n=new o,n.chart=this.chart,t.bulletConfig&&(n.availableSpace=i,n.graph=this,t.bulletConfig.minCoord=this.minCoord-i,n.bulletConfig=t.bulletConfig),n.write(s),n=n.set):(this.chart.path&&(o=this.chart.path+o),n=s.set(),s=s.image(o,0,0,r,r),n.push(s),this.centerCustomBullets&&s.translate(-r/2,-r/2)));n&&((t.url||this.showHandOnHover)&&n.setAttr("cursor","pointer"),"serial"==this.chartType&&(0>e-0||e-0>this.width||i<-r/2||i-0>this.height)&&(n.remove(),n=null),n&&(this.bulletSet.push(n),n.translate(e,i),this.addListeners(n,t),this.allBullets.push(n)),t.bx=e,t.by=i);t.bulletGraphics=n;return r},showBullets:function(){var t=this.allBullets,e;this.bulletsHidden=!1;for(e=0;e<t.length;e++)t[e].show()},hideBullets:function(){var t=this.allBullets,e;this.bulletsHidden=!0;for(e=0;e<t.length;e++)t[e].hide()},addListeners:function(t,e){var i=this;t.mouseover(function(t){i.handleRollOver(e,t)}).mouseout(function(t){i.handleRollOut(e,t)}).touchend(function(t){i.handleRollOver(e,t);i.chart.panEventsEnabled&&i.handleClick(e,t)}).touchstart(function(t){i.handleRollOver(e,t)}).click(function(t){i.handleClick(e,t)}).dblclick(function(t){i.handleDoubleClick(e,t)}).contextmenu(function(t){i.handleRightClick(e,t)})},handleRollOver:function(t,e){if(t){var i=this.chart,s={type:"rollOverGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("rollOverGraphItem",s);i.fire("rollOverGraphItem",s);clearTimeout(i.hoverInt);s=this.showBalloon;i.chartCursor&&"serial"==this.chartType&&(s=!1,!i.chartCursor.valueBalloonsEnabled&&this.showBalloon&&(s=!0));if(s){var s=i.formatString(this.balloonText,t,t.graph),a=this.balloonFunction;a&&(s=a(t,t.graph));s=AmCharts.cleanFromEmpty(s);a=i.getBalloonColor(this,t);i.balloon.showBullet=!1;i.balloon.pointerOrientation="V";var r=t.x,h=t.y;i.rotate&&(r=t.y,h=t.x);i.showBalloon(s,a,!0,r+i.marginLeftReal,h+i.marginTopReal)}}},handleRollOut:function(t,e){this.chart.hideBalloon();if(t){var i={type:"rollOutGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("rollOutGraphItem",i);this.chart.fire("rollOutGraphItem",i)}},handleClick:function(t,e){if(t){var i={type:"clickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("clickGraphItem",i);this.chart.fire("clickGraphItem",i);AmCharts.getURL(t.url,this.urlTarget)}this.handleGraphClick()},handleGraphClick:function(){var t={type:"clickGraph",graph:this,target:this,chart:this.chart};this.fire("clickGraph",t);this.chart.fire("clickGraph",t)},handleRightClick:function(t,e){if(t){var i={type:"rightClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("rightClickGraphItem",i);this.chart.fire("rightClickGraphItem",i)}},handleDoubleClick:function(t,e){if(t){var i={type:"doubleClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("doubleClickGraphItem",i);this.chart.fire("doubleClickGraphItem",i)}},zoom:function(t,e){this.start=t;this.end=e;this.draw()},changeOpacity:function(t){var e=this.set;e&&e.setAttr("opacity",t);if(e=this.ownColumns){var i;for(i=0;i<e.length;i++){var s=e[i].set;s&&s.setAttr("opacity",t)}}(e=this.bulletSet)&&e.setAttr("opacity",t)},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.bulletSet);var t=this.timeOuts;if(t){var e;for(e=0;e<t.length;e++)clearTimeout(t[e])}this.timeOuts=[]}});AmCharts.ChartCursor=AmCharts.Class({construct:function(t){this.createEvents("changed","zoomed","onHideCursor","draw","selected");this.className="ChartCursor";this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;AmCharts.applyTheme(this,t,"ChartCursor")},draw:function(){var t=this;t.destroy();var e=t.chart,i=e.container;t.rotate=e.rotate;t.container=i;i=i.set();i.translate(t.x,t.y);t.set=i;e.cursorSet.push(i);i=new AmCharts.AmBalloon;i.chart=e;t.categoryBalloon=i;AmCharts.copyProperties(e.balloon,i);i.cornerRadius=0;i.shadowAlpha=0;i.borderThickness=1;i.borderAlpha=1;i.showBullet=!1;var s=t.categoryBalloonColor;void 0===s&&(s=t.cursorColor);i.fillColor=s;i.fillAlpha=t.categoryBalloonAlpha;i.borderColor=s;i.color=t.color;t.rotate&&(i.pointerOrientation="H");t.prevX=[];t.prevY=[];t.prevTX=[];t.prevTY=[];if(t.valueBalloonsEnabled)for(i=0;i<e.graphs.length;i++)s=new AmCharts.AmBalloon,s.chart=e,AmCharts.copyProperties(e.balloon,s),e.graphs[i].valueBalloon=s;"cursor"==t.type?t.createCursor():t.createCrosshair();t.interval=setInterval(function(){t.detectMovement.call(t)},40)},updateData:function(){var t=this.chart;this.data=t.chartData;this.firstTime=t.firstTime;this.lastTime=t.lastTime},createCursor:function(){var t=this.chart,e=this.cursorAlpha,i=t.categoryAxis,s=i.position,a=i.inside,r=i.axisThickness,h=this.categoryBalloon,o,n,l=t.dx,d=t.dy,u=this.x,c=this.y,m=this.width,p=this.height,t=t.rotate,f=i.tickLength;h.pointerWidth=f;t?(o=[0,m,m+l],n=[0,0,d]):(o=[l,0,0],n=[d,0,p]);this.line=e=AmCharts.line(this.container,o,n,this.cursorColor,e,1);this.set.push(e);t?(a&&(h.pointerWidth=0),"right"==s?a?h.setBounds(u,c+d,u+m+l,c+p+d):h.setBounds(u+m+l+r,c+d,u+m+1e3,c+p+d):a?h.setBounds(u,c,m+u,p+c):h.setBounds(-1e3,-1e3,u-f-r,c+p+15)):(h.maxWidth=m,i.parseDates&&(f=0,h.pointerWidth=0),"top"==s?a?h.setBounds(u+l,c+d,m+l+u,p+c):h.setBounds(u+l,-1e3,m+l+u,c+d-f-r):a?h.setBounds(u,c,m+u,p+c-f):h.setBounds(u,c+p+f+r-1,u+m,c+p+f+r));this.hideCursor()},createCrosshair:function(){var t=this.cursorAlpha,e=this.container,i=AmCharts.line(e,[0,0],[0,this.height],this.cursorColor,t,1),t=AmCharts.line(e,[0,this.width],[0,0],this.cursorColor,t,1);this.set.push(i);this.set.push(t);this.vLine=i;this.hLine=t;this.hideCursor()},detectMovement:function(){var t=this.chart;if(t.mouseIsOver){var e=t.mouseX-this.x,i=t.mouseY-this.y;0<e&&e<this.width&&0<i&&i<this.height?(this.drawing?this.rolledOver||t.setMouseCursor("crosshair"):this.pan&&(this.rolledOver||t.setMouseCursor("move")),this.rolledOver=!0,this.setPosition()):this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)}else this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)},getMousePosition:function(){var t,e=this.width,i=this.height;t=this.chart;this.rotate?(t=t.mouseY-this.y,0>t&&(t=0),t>i&&(t=i)):(t=t.mouseX-this.x,0>t&&(t=0),t>e&&(t=e));return t},updateCrosshair:function(){var t=this.chart,e=t.mouseX-this.x,i=t.mouseY-this.y,s=this.vLine,a=this.hLine,e=AmCharts.fitToBounds(e,0,this.width),i=AmCharts.fitToBounds(i,0,this.height);0<this.cursorAlpha&&(s.show(),a.show(),s.translate(e,0),a.translate(0,i));this.zooming&&(t.hideXScrollbar&&(e=NaN),t.hideYScrollbar&&(i=NaN),this.updateSelectionSize(e,i));t.mouseIsOver||this.zooming||this.hideCursor()},updateSelectionSize:function(t,e){AmCharts.remove(this.selection);var i=this.selectionPosX,s=this.selectionPosY,a=0,r=0,h=this.width,o=this.height;isNaN(t)||(i>t&&(a=t,h=i-t),i<t&&(a=i,h=t-i),i==t&&(a=t,h=0));isNaN(e)||(s>e&&(r=e,o=s-e),s<e&&(r=s,o=e-s),s==e&&(r=e,o=0));0<h&&0<o&&(i=AmCharts.rect(this.container,h,o,this.cursorColor,this.selectionAlpha),i.translate(a+this.x,r+this.y),this.selection=i)},arrangeBalloons:function(){var t=this.valueBalloons,e=this.x,i=this.y,s=this.height+i;t.sort(this.compareY);var a;for(a=0;a<t.length;a++){var r=t[a].balloon;r.setBounds(e,i,e+this.width,s);r.prevX=this.prevX[a];r.prevY=this.prevY[a];r.prevTX=this.prevTX[a];r.prevTY=this.prevTY[a];r.draw();s=r.yPos-3}this.arrangeBalloons2()},compareY:function(t,e){return t.yy<e.yy?1:-1},arrangeBalloons2:function(){var t=this.valueBalloons;t.reverse();var e,i=this.x,s,a,r=t.length;for(a=0;a<r;a++){var h=t[a].balloon;e=h.bottom;var o=h.bottom-h.yPos,n=r-a-1;0<a&&e-o<s+3&&(h.setBounds(i,s+3,i+this.width,s+o+3),h.prevX=this.prevX[n],h.prevY=this.prevY[n],h.prevTX=this.prevTX[n],h.prevTY=this.prevTY[n],h.draw());h.set&&h.set.show();this.prevX[n]=h.prevX;this.prevY[n]=h.prevY;this.prevTX[n]=h.prevTX;this.prevTY[n]=h.prevTY;s=h.bottom}},showBullets:function(){AmCharts.remove(this.allBullets);var t=this.container,e=t.set();this.set.push(e);this.set.show();this.allBullets=e;var e=this.chart.graphs,i;for(i=0;i<e.length;i++){var s=e[i];if(!s.hidden&&s.balloonText){var a=this.data[this.index].axes[s.valueAxis.id].graphs[s.id],r=a.y;if(!isNaN(r)){var h,o;h=a.x;this.rotate?(o=r,r=h):o=h;s=AmCharts.circle(t,this.bulletSize/2,this.chart.getBalloonColor(s,a,!0),s.cursorBulletAlpha);s.translate(o,r);this.allBullets.push(s)}}}},destroy:function(){this.clear();AmCharts.remove(this.selection);this.selection=null;var t=this.categoryBalloon;t&&t.destroy();this.destroyValueBalloons();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},destroyValueBalloons:function(){var t=this.valueBalloons;if(t){var e;for(e=0;e<t.length;e++)t[e].balloon.hide()}},zoom:function(t,e,i,s){var a=this.chart;this.destroyValueBalloons();this.zooming=!1;var r;this.rotate?this.selectionPosY=r=a.mouseY:this.selectionPosX=r=a.mouseX;this.start=t;this.end=e;this.startTime=i;this.endTime=s;this.zoomed=!0;var h=a.categoryAxis,a=this.rotate;r=this.width;var o=this.height;h.parseDates&&!h.equalSpacing?(t=s-i+h.minDuration(),t=a?o/t:r/t):t=a?o/(e-t):r/(e-t);this.stepWidth=t;this.tempVal=this.valueBalloonsEnabled;this.valueBalloonsEnabled=!1;this.setPosition();this.valueBalloonsEnabled=this.tempVal;this.hideCursor()},hideObj:function(t){t&&t.hide()},hideCursor:function(t){void 0===t&&(t=!0);this.hideObj(this.set);this.hideObj(this.categoryBalloon);this.hideObj(this.line);this.hideObj(this.vLine);this.hideObj(this.hLine);this.hideObj(this.allBullets);this.destroyValueBalloons();this.selectWithoutZooming||AmCharts.remove(this.selection);this.previousIndex=NaN;t&&this.fire("onHideCursor",{type:"onHideCursor",chart:this.chart,target:this});this.drawing||this.chart.setMouseCursor("auto");this.normalizeBulletSize()},setPosition:function(t,e){void 0===e&&(e=!0);if("cursor"==this.type){if(AmCharts.ifArray(this.data)){isNaN(t)&&(t=this.getMousePosition());if((t!=this.previousMousePosition||!0===this.zoomed||this.oneBalloonOnly)&&!isNaN(t)){var i=this.chart.categoryAxis.xToIndex(t);if(i!=this.previousIndex||this.zoomed||"mouse"==this.cursorPosition||this.oneBalloonOnly)this.updateCursor(i,e),this.zoomed=!1}this.previousMousePosition=t}}else this.updateCrosshair()},normalizeBulletSize:function(){var t=this.resizedBullets;if(t)for(var e=0;e<t.length;e++){var i=t[e],s=i.bulletGraphics;s&&s.translate(i.bx,i.by,1)}},updateCursor:function(t,e){var i=this.chart,s=i.mouseX-this.x,a=i.mouseY-this.y;this.drawingNow&&(AmCharts.remove(this.drawingLine),this.drawingLine=AmCharts.line(this.container,[this.x+this.drawStartX,this.x+s],[this.y+this.drawStartY,this.y+a],this.cursorColor,1,1));if(this.enabled){void 0===e&&(e=!0);this.index=t;var r=i.categoryAxis,h=i.dx,o=i.dy,n=this.x,l=this.y,d=this.width,u=this.height,c=this.data[t];if(c){var m=c.x[r.id],p=i.rotate,f=r.inside,g=this.stepWidth,v=this.categoryBalloon,C=this.firstTime,A=this.lastTime,b=this.cursorPosition,x=r.position,y=this.zooming,w=this.panning,M=i.graphs,N=r.axisThickness;if(i.mouseIsOver||y||w||this.forceShow)if(this.forceShow=!1,w){var h=this.panClickPos,i=this.panClickEndTime,y=this.panClickStartTime,S=this.panClickEnd,n=this.panClickStart,s=(p?h-a:h-s)/g;if(!r.parseDates||r.equalSpacing)s=Math.round(s);0!==s&&(h={type:"zoomed",target:this},h.chart=this.chart,r.parseDates&&!r.equalSpacing?(i+s>A&&(s=A-i),y+s<C&&(s=C-y),h.start=y+s,h.end=i+s,this.fire(h.type,h)):S+s>=this.data.length||0>n+s||(h.start=n+s,h.end=S+s,this.fire(h.type,h)))}else{"start"==b&&(m-=r.cellWidth/2);"mouse"==b&&i.mouseIsOver&&(m=p?a-2:s-2);if(p){if(0>m)if(y)m=0;else{this.hideCursor();return}if(m>u+1)if(y)m=u+1;else{this.hideCursor();return}}else{if(0>m)if(y)m=0;else{this.hideCursor();return}if(m>d)if(y)m=d;else{this.hideCursor();return}}0<this.cursorAlpha&&(C=this.line,p?(A=0,g=m+o):(A=m,g=0),b=this.animationDuration,0<b&&!this.zooming?isNaN(this.previousX)?C.translate(A,g):(C.translate(this.previousX,this.previousY),C.animate({translate:A+","+g},b,"easeOutSine")):C.translate(A,g),this.previousX=A,this.previousY=g,C.show());this.linePos=p?m+o:m;y&&(p?this.updateSelectionSize(NaN,m):this.updateSelectionSize(m,NaN));g=!0;y&&(g=!1);this.categoryBalloonEnabled&&g?(p?(f&&("right"==x?v.setBounds(n,l+o,n+d+h,l+m+o):v.setBounds(n,l+o,n+d+h,l+m)),"right"==x?f?v.setPosition(n+d+h,l+m+o):v.setPosition(n+d+h+N,l+m+o):f?v.setPosition(n,l+m):v.setPosition(n-N,l+m)):"top"==x?f?v.setPosition(n+m+h,l+o):v.setPosition(n+m+h,l+o-N+1):f?v.setPosition(n+m,l+u):v.setPosition(n+m,l+u+N-1),(C=this.categoryBalloonFunction)?v.showBalloon(C(c.category)):r.parseDates?(r=AmCharts.formatDate(c.category,this.categoryBalloonDateFormat),-1!=r.indexOf("fff")&&(r=AmCharts.formatMilliseconds(r,c.category)),v.showBalloon(r)):v.showBalloon(c.category)):v.hide();M&&this.bulletsEnabled&&this.showBullets();if(this.oneBalloonOnly){o=Infinity;for(A=0;A<M.length;A++)r=M[A],r.showBalloon&&!r.hidden&&r.balloonText&&(v=c.axes[r.valueAxis.id].graphs[r.id],C=v.y,isNaN(C)||(p?Math.abs(s-C)<o&&(o=Math.abs(s-C),S=r):Math.abs(a-C)<o&&(o=Math.abs(a-C),S=r)));this.mostCloseGraph&&(S=this.mostCloseGraph)}if(t!=this.previousIndex||S!=this.previousMostCloseGraph)if(this.normalizeBulletSize(),this.destroyValueBalloons(),this.resizedBullets=[],M&&this.valueBalloonsEnabled&&g&&i.balloon.enabled){this.valueBalloons=o=[];for(A=0;A<M.length;A++)if(r=M[A],(!this.oneBalloonOnly||r==S)&&r.showBalloon&&!r.hidden&&r.balloonText){v=c.axes[r.valueAxis.id].graphs[r.id];C=v.y;if(this.showNextAvalable&&isNaN(C)&&t+1<this.data.length)for(m=t+1;m<this.data.length;m++)if(f=this.data[m])if(v=f.axes[r.valueAxis.id].graphs[r.id],C=v.y,!isNaN(C))break;if(!isNaN(C)){f=v.x;g=!0;if(p){if(m=C,0>f||f>u)g=!1}else if(m=f,f=C,0>m||m>d+h)g=!1;g&&(1!=this.graphBulletSize&&AmCharts.isModern&&(g=v.bulletGraphics)&&(g.getBBox(),g.translate(v.bx,v.by,this.graphBulletSize),this.resizedBullets.push(v)),g=r.valueBalloon,x=i.getBalloonColor(r,v),g.setBounds(n,l,n+d,l+u),g.pointerOrientation="H",g.changeColor(x),void 0!==r.balloonAlpha&&(g.fillAlpha=r.balloonAlpha),void 0!==r.balloonTextColor&&(g.color=r.balloonTextColor),g.setPosition(m+n,f+l),m=i.formatString(r.balloonText,v,r),(f=r.balloonFunction)&&(m=f(v,r)),""!==m&&(p?g.showBalloon(m):(g.text=m,g.show=!0)),!p&&g.set&&g.set.hide(),o.push({yy:C,balloon:g}))}}p||this.arrangeBalloons()}e?(h={type:"changed"},h.index=t,h.target=this,h.chart=this.chart,h.zooming=y,h.mostCloseGraph=S,h.position=p?a:s,h.target=this,i.fire("changed",h),this.fire("changed",h),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,i.updateLegendValues(t));this.previousIndex=t;this.previousMostCloseGraph=S}}}else this.hideCursor()},enableDrawing:function(t){this.enabled=!t;this.hideCursor();this.rolledOver=!1;this.drawing=t},isZooming:function(t){t&&t!=this.zooming&&this.handleMouseDown("fake");t||t==this.zooming||this.handleMouseUp()},handleMouseOut:function(){if(this.enabled)if(this.zooming)this.setPosition();else{this.index=void 0;var t={type:"changed",index:void 0,target:this};t.chart=this.chart;this.fire("changed",t);this.hideCursor()}},handleReleaseOutside:function(){this.handleMouseUp()},handleMouseUp:function(){var t=this.chart,e=this.data,i;if(t){var s=t.mouseX-this.x,a=t.mouseY-this.y;if(this.drawingNow){this.drawingNow=!1;AmCharts.remove(this.drawingLine);i=this.drawStartX;var r=this.drawStartY;if(2<Math.abs(i-s)||2<Math.abs(r-a))i={type:"draw",target:this,chart:t,initialX:i,initialY:r,finalX:s,finalY:a},this.fire(i.type,i)}if(this.enabled&&0<e.length){if(this.pan)this.rolledOver=!1;else if(this.zoomable&&this.zooming){i=this.selectWithoutZooming?{type:"selected"}:{type:"zoomed"};i.target=this;i.chart=t;if("cursor"==this.type)this.rotate?this.selectionPosY=a:this.selectionPosX=a=s,2>Math.abs(a-this.initialMouse)&&this.fromIndex==this.index||(this.index<this.fromIndex?(i.end=this.fromIndex,i.start=this.index):(i.end=this.index,i.start=this.fromIndex),a=t.categoryAxis,a.parseDates&&!a.equalSpacing&&(i.start=e[i.start].time,i.end=t.getEndTime(e[i.end].time)),this.skipZoomDispatch||this.fire(i.type,i));else{var h=this.initialMouseX,o=this.initialMouseY;3>Math.abs(s-h)&&3>Math.abs(a-o)||(e=Math.min(h,s),r=Math.min(o,a),s=Math.abs(h-s),a=Math.abs(o-a),t.hideXScrollbar&&(e=0,s=this.width),t.hideYScrollbar&&(r=0,a=this.height),i.selectionHeight=a,i.selectionWidth=s,i.selectionY=r,i.selectionX=e,this.skipZoomDispatch||this.fire(i.type,i))}this.selectWithoutZooming||AmCharts.remove(this.selection)}this.panning=this.zooming=this.skipZoomDispatch=!1}}},showCursorAt:function(t){var e=this.chart.categoryAxis;t=e.parseDates?e.dateToCoordinate(t):e.categoryToCoordinate(t);this.previousMousePosition=NaN;this.forceShow=!0;this.setPosition(t,!1)},handleMouseDown:function(t){if(this.zoomable||this.pan||this.drawing){var e=this.rotate,i=this.chart,s=i.mouseX-this.x,a=i.mouseY-this.y;if(0<s&&s<this.width&&0<a&&a<this.height||"fake"==t)this.setPosition(),this.selectWithoutZooming&&AmCharts.remove(this.selection),this.drawing?(this.drawStartY=a,this.drawStartX=s,this.drawingNow=!0):this.pan?(this.zoomable=!1,i.setMouseCursor("move"),this.panning=!0,this.panClickPos=e?a:s,this.panClickStart=this.start,this.panClickEnd=this.end,this.panClickStartTime=this.startTime,this.panClickEndTime=this.endTime):this.zoomable&&("cursor"==this.type?(this.fromIndex=this.index,e?(this.initialMouse=a,this.selectionPosY=this.linePos):(this.initialMouse=s,this.selectionPosX=this.linePos)):(this.initialMouseX=s,this.initialMouseY=a,this.selectionPosX=s,this.selectionPosY=a),this.zooming=!0)}}});AmCharts.SimpleChartScrollbar=AmCharts.Class({construct:function(t){this.createEvents("zoomed");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconWidth=18;this.dragIconHeight=25;AmCharts.applyTheme(this,t,"SimpleChartScrollbar")},draw:function(){var t=this;t.destroy();t.interval=setInterval(function(){t.updateScrollbar.call(t)},40);var e=t.chart.container,i=t.rotate,s=t.chart,a=e.set();t.set=a;s.scrollbarsSet.push(a);var r,h;i?(r=t.scrollbarHeight,h=s.plotAreaHeight):(h=t.scrollbarHeight,r=s.plotAreaWidth);t.width=r;if((t.height=h)&&r){var o=AmCharts.rect(e,r,h,t.backgroundColor,t.backgroundAlpha,1,t.backgroundColor,t.backgroundAlpha);t.bg=o;a.push(o);o=AmCharts.rect(e,r,h,"#000",.005);a.push(o);t.invisibleBg=o;o.click(function(){t.handleBgClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()}).touchend(function(){t.handleBgClick()});o=AmCharts.rect(e,r,h,t.selectedBackgroundColor,t.selectedBackgroundAlpha);t.selectedBG=o;a.push(o);r=AmCharts.rect(e,r,h,"#000",.005);t.dragger=r;a.push(r);r.mousedown(function(e){t.handleDragStart(e)}).mouseup(function(){t.handleDragStop()}).mouseover(function(){t.handleDraggerOver()}).mouseout(function(){t.handleMouseOut()}).touchstart(function(e){t.handleDragStart(e)}).touchend(function(){t.handleDragStop()});r=s.pathToImages;i?(o=r+"dragIconH.gif",r=t.dragIconWidth,i=t.dragIconHeight):(o=r+"dragIcon.gif",i=t.dragIconWidth,r=t.dragIconHeight);h=e.image(o,0,0,i,r);var o=e.image(o,0,0,i,r),n=10,l=20;s.panEventsEnabled&&(n=25,l=t.scrollbarHeight);var d=AmCharts.rect(e,n,l,"#000",.005),u=AmCharts.rect(e,n,l,"#000",.005);u.translate(-(n-i)/2,-(l-r)/2);d.translate(-(n-i)/2,-(l-r)/2);i=e.set([h,u]);e=e.set([o,d]);t.iconLeft=i;a.push(t.iconLeft);t.iconRight=e;a.push(e);i.mousedown(function(){t.leftDragStart()}).mouseup(function(){t.leftDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(e){t.leftDragStart()}).touchend(function(){t.leftDragStop()});e.mousedown(function(){t.rightDragStart()}).mouseup(function(){t.rightDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(e){t.rightDragStart()}).touchend(function(){t.rightDragStop()});AmCharts.ifArray(s.chartData)?a.show():a.hide();t.hideDragIcons();t.clipDragger(!1)}a.translate(t.x,t.y)},updateScrollbarSize:function(t,e){var i=this.dragger,s,a,r,h;this.rotate?(s=0,a=t,r=this.width+1,h=e-t,i.setAttr("height",e-t),i.setAttr("y",a)):(s=t,a=0,r=e-t,h=this.height+1,i.setAttr("width",e-t),i.setAttr("x",s));this.clipAndUpdate(s,a,r,h)},updateScrollbar:function(){var t,e=!1,i,s,a=this.x,r=this.y,h=this.dragger,o=this.getDBox();i=o.x+a;s=o.y+r;var n=o.width,o=o.height,l=this.rotate,d=this.chart,u=this.width,c=this.height,m=d.mouseX,p=d.mouseY;t=this.initialMouse;d.mouseIsOver&&(this.dragging&&(d=this.initialCoord,l?(t=d+(p-t),0>t&&(t=0),d=c-o,t>d&&(t=d),h.setAttr("y",t)):(t=d+(m-t),0>t&&(t=0),d=u-n,t>d&&(t=d),h.setAttr("x",t))),this.resizingRight&&(l?(t=p-s,t+s>c+r&&(t=c-s+r),0>t?(this.resizingRight=!1,e=this.resizingLeft=!0):(0===t&&(t=.1),h.setAttr("height",t))):(t=m-i,t+i>u+a&&(t=u-i+a),0>t?(this.resizingRight=!1,e=this.resizingLeft=!0):(0===t&&(t=.1),h.setAttr("width",t)))),this.resizingLeft&&(l?(i=s,s=p,s<r&&(s=r),s>c+r&&(s=c+r),t=!0===e?i-s:o+i-s,0>t?(this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("y",i+o-r)):(0===t&&(t=.1),h.setAttr("y",s-r),h.setAttr("height",t))):(s=m,s<a&&(s=a),s>u+a&&(s=u+a),t=!0===e?i-s:n+i-s,0>t?(this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("x",i+n-a)):(0===t&&(t=.1),h.setAttr("x",s-a),h.setAttr("width",t)))),this.clipDragger(!0))},clipDragger:function(t){var e=this.getDBox();if(e){var i=e.x,s=e.y,a=e.width,e=e.height,r=!1;if(this.rotate){if(i=0,a=this.width+1,this.clipY!=s||this.clipH!=e)r=!0}else if(s=0,e=this.height+1,this.clipX!=i||this.clipW!=a)r=!0;r&&(this.clipAndUpdate(i,s,a,e),t&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))}},maskGraphs:function(){},clipAndUpdate:function(t,e,i,s){this.clipX=t;this.clipY=e;this.clipW=i;this.clipH=s;this.selectedBG.clipRect(t,e,i,s);this.updateDragIconPositions();this.maskGraphs(t,e,i,s)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart;t.hideBalloon();var e=this.getDBox(),i=e.x,s=e.y,a=e.width,e=e.height;this.rotate?(i=s,a=this.height/e):a=this.width/a;t={type:"zoomed",position:i,chart:t,target:this,multiplier:a};this.fire(t.type,t)}},updateDragIconPositions:function(){var t=this.getDBox(),e=t.x,i=t.y,s=this.iconLeft,a=this.iconRight,r,h,o=this.scrollbarHeight;this.rotate?(r=this.dragIconWidth,h=this.dragIconHeight,s.translate((o-h)/2,i-r/2),a.translate((o-h)/2,i+t.height-r/2)):(r=this.dragIconHeight,h=this.dragIconWidth,s.translate(e-h/2,(o-r)/2),a.translate(e+-h/2+t.width,(o-r)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){this.resizingLeft||this.resizingRight||this.dragging||(this.hideResizeGrips&&(this.iconLeft.hide(),this.iconRight.hide()),this.removeCursors())},removeCursors:function(){this.chart.setMouseCursor("auto")},relativeZoom:function(t,e){this.dragger.stop();this.multiplier=t;this.position=e;this.updateScrollbarSize(e,this.rotate?e+this.height/t:e+this.width/t)},destroy:function(){this.clear();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},handleDragStart:function(){
var t=this.chart;this.dragger.stop();this.removeCursors();this.dragging=!0;var e=this.getDBox();this.rotate?(this.initialCoord=e.y,this.initialMouse=t.mouseY):(this.initialCoord=e.x,this.initialMouse=t.mouseX)},handleDragStop:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();this.updateScrollbar()},handleDraggerOver:function(){this.handleMouseOver()},leftDragStart:function(){this.dragger.stop();this.resizingLeft=!0},leftDragStop:function(){this.resizingLeft=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},rightDragStart:function(){this.dragger.stop();this.resizingRight=!0},rightDragStop:function(){this.resizingRight=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.chart.setMouseCursor("n-resize"):this.chart.setMouseCursor("e-resize");this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){if(!this.resizingRight&&!this.resizingLeft){this.zooming=!0;var t,e,i=this.scrollDuration,s=this.dragger;t=this.getDBox();var a=t.height,r=t.width;e=this.chart;var h=this.y,o=this.x,n=this.rotate;n?(t="y",e=e.mouseY-a/2-h,e=AmCharts.fitToBounds(e,0,this.height-a)):(t="x",e=e.mouseX-r/2-o,e=AmCharts.fitToBounds(e,0,this.width-r));this.updateOnReleaseOnly?(this.skipEvent=!1,s.setAttr(t,e),this.dispatchScrollbarEvent(),this.clipDragger()):(e=Math.round(e),n?s.animate({y:e},i,">"):s.animate({x:e},i,">"))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.updateOnRelease(),this.removeCursors();this.mouseIsOver=this.dragging=this.resizingRight=this.resizingLeft=!1;this.hideDragIcons();this.updateScrollbar()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons()}});AmCharts.ChartScrollbar=AmCharts.Class({inherits:AmCharts.SimpleChartScrollbar,construct:function(t){AmCharts.ChartScrollbar.base.construct.call(this,t);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1;AmCharts.applyTheme(this,t,"ChartScrollbar")},init:function(){var t=this.categoryAxis,e=this.chart;t||(this.categoryAxis=t=new AmCharts.CategoryAxis);t.chart=e;t.id="scrollbar";t.dateFormats=e.categoryAxis.dateFormats;t.boldPeriodBeginning=e.categoryAxis.boldPeriodBeginning;t.axisItemRenderer=AmCharts.RecItem;t.axisRenderer=AmCharts.RecAxis;t.guideFillRenderer=AmCharts.RecFill;t.inside=!0;t.fontSize=this.fontSize;t.tickLength=0;t.axisAlpha=0;AmCharts.isString(this.graph)&&(this.graph=AmCharts.getObjById(e.graphs,this.graph));if(t=this.graph){var i=this.valueAxis;i||(this.valueAxis=i=new AmCharts.ValueAxis,i.visible=!1,i.scrollbar=!0,i.axisItemRenderer=AmCharts.RecItem,i.axisRenderer=AmCharts.RecAxis,i.guideFillRenderer=AmCharts.RecFill,i.labelsEnabled=!1,i.chart=e);e=this.unselectedGraph;e||(e=new AmCharts.AmGraph,e.scrollbar=!0,this.unselectedGraph=e,e.negativeBase=t.negativeBase,e.noStepRisers=t.noStepRisers);e=this.selectedGraph;e||(e=new AmCharts.AmGraph,e.scrollbar=!0,this.selectedGraph=e,e.negativeBase=t.negativeBase,e.noStepRisers=t.noStepRisers)}this.scrollbarCreated=!0},draw:function(){var t=this;AmCharts.ChartScrollbar.base.draw.call(t);t.scrollbarCreated||t.init();var e=t.chart,i=e.chartData,s=t.categoryAxis,a=t.rotate,r=t.x,h=t.y,o=t.width,n=t.height,l=e.categoryAxis,d=t.set;s.setOrientation(!a);s.parseDates=l.parseDates;s.rotate=a;s.equalSpacing=l.equalSpacing;s.minPeriod=l.minPeriod;s.startOnAxis=l.startOnAxis;s.viW=o;s.viH=n;s.width=o;s.height=n;s.gridCount=t.gridCount;s.gridColor=t.gridColor;s.gridAlpha=t.gridAlpha;s.color=t.color;s.tickLength=0;s.axisAlpha=0;s.autoGridCount=t.autoGridCount;s.parseDates&&!s.equalSpacing&&s.timeZoom(e.firstTime,e.lastTime);s.zoom(0,i.length-1);if(l=t.graph){var u=t.valueAxis,c=l.valueAxis;u.id=c.id;u.rotate=a;u.setOrientation(a);u.width=o;u.height=n;u.viW=o;u.viH=n;u.dataProvider=i;u.reversed=c.reversed;u.logarithmic=c.logarithmic;u.gridAlpha=0;u.axisAlpha=0;d.push(u.set);a?(u.y=h,u.x=0):(u.x=r,u.y=0);var r=Infinity,h=-Infinity,m;for(m=0;m<i.length;m++){var p=i[m].axes[c.id].graphs[l.id].values,f;for(f in p)if(p.hasOwnProperty(f)&&"percents"!=f&&"total"!=f){var g=p[f];g<r&&(r=g);g>h&&(h=g)}}Infinity!=r&&(u.minimum=r);-Infinity!=h&&(u.maximum=h+.1*(h-r));r==h&&(u.minimum-=1,u.maximum+=1);void 0!==t.minimum&&(u.minimum=t.minimum);void 0!==t.maximum&&(u.maximum=t.maximum);u.zoom(0,i.length-1);f=t.unselectedGraph;f.id=l.id;f.rotate=a;f.chart=e;f.chartType=e.chartType;f.data=i;f.valueAxis=u;f.chart=l.chart;f.categoryAxis=t.categoryAxis;f.periodSpan=l.periodSpan;f.valueField=l.valueField;f.openField=l.openField;f.closeField=l.closeField;f.highField=l.highField;f.lowField=l.lowField;f.lineAlpha=t.graphLineAlpha;f.lineColor=t.graphLineColor;f.fillAlphas=t.graphFillAlpha;f.fillColors=t.graphFillColor;f.connect=l.connect;f.hidden=l.hidden;f.width=o;f.height=n;c=t.selectedGraph;c.id=l.id;c.rotate=a;c.chart=e;c.chartType=e.chartType;c.data=i;c.valueAxis=u;c.chart=l.chart;c.categoryAxis=s;c.periodSpan=l.periodSpan;c.valueField=l.valueField;c.openField=l.openField;c.closeField=l.closeField;c.highField=l.highField;c.lowField=l.lowField;c.lineAlpha=t.selectedGraphLineAlpha;c.lineColor=t.selectedGraphLineColor;c.fillAlphas=t.selectedGraphFillAlpha;c.fillColors=t.selectedGraphFillColor;c.connect=l.connect;c.hidden=l.hidden;c.width=o;c.height=n;e=t.graphType;e||(e=l.type);f.type=e;c.type=e;i=i.length-1;f.zoom(0,i);c.zoom(0,i);c.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});f.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});d.push(f.set);d.push(c.set)}d.push(s.set);d.push(s.labelsSet);t.bg.toBack();t.invisibleBg.toFront();t.dragger.toFront();t.iconLeft.toFront();t.iconRight.toFront()},timeZoom:function(t,e){this.startTime=t;this.endTime=e;this.timeDifference=e-t;this.skipEvent=!0;this.zoomScrollbar()},zoom:function(t,e){this.start=t;this.end=e;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart.chartData,e,i,s=this.dragger.getBBox();e=s.x;i=s.y;var a=s.width,r=s.height,s=this.chart;this.rotate?(e=i,i=r):i=a;a={type:"zoomed",target:this};a.chart=s;var r=this.categoryAxis,h=this.stepWidth;if(r.parseDates&&!r.equalSpacing){if(t=s.firstTime,r.minDuration(),s=Math.round(e/h)+t,t=this.dragging?s+this.timeDifference:Math.round((e+i)/h)+t,s>t&&(s=t),s!=this.startTime||t!=this.endTime)this.startTime=s,this.endTime=t,a.start=s,a.end=t,a.startDate=new Date(s),a.endDate=new Date(t),this.fire(a.type,a)}else if(r.startOnAxis||(e+=h/2),i-=this.stepWidth/2,s=r.xToIndex(e),e=r.xToIndex(e+i),s!=this.start||this.end!=e)r.startOnAxis&&(this.resizingRight&&s==e&&e++,this.resizingLeft&&s==e&&(0<s?s--:e=1)),this.start=s,this.end=this.dragging?this.start+this.difference:e,a.start=this.start,a.end=this.end,r.parseDates&&(t[this.start]&&(a.startDate=new Date(t[this.start].time)),t[this.end]&&(a.endDate=new Date(t[this.end].time))),this.fire(a.type,a)}},zoomScrollbar:function(){var t,e;t=this.chart;var i=t.chartData,s=this.categoryAxis;s.parseDates&&!s.equalSpacing?(i=s.stepWidth,s=t.firstTime,t=i*(this.startTime-s),e=i*(this.endTime-s)):(t=i[this.start].x[s.id],e=i[this.end].x[s.id],i=s.stepWidth,s.startOnAxis||(s=i/2,t-=s,e+=s));this.stepWidth=i;this.updateScrollbarSize(t,e)},maskGraphs:function(t,e,i,s){var a=this.selectedGraph;a&&a.set.clipRect(t,e,i,s)},handleDragStart:function(){AmCharts.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){AmCharts.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}});AmCharts.AmBalloon=AmCharts.Class({construct:function(t){this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maximumWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!1;this.offsetY=6;this.offsetX=1;AmCharts.isModern||(this.offsetY*=1.5);AmCharts.applyTheme(this,t,"AmBalloon")},draw:function(){var t=this.pointToX,e=this.pointToY;this.deltaSignX=this.deltaSignY=1;var i=this.chart;AmCharts.VML&&(this.fadeOutDuration=0);this.xAnim&&i.stopAnim(this.xAnim);this.yAnim&&i.stopAnim(this.yAnim);if(!isNaN(t)){var s=this.follow,a=i.container,r=this.set;AmCharts.remove(r);this.removeDiv();this.set=r=a.set();i.balloonsSet.push(r);if(this.show){var h=this.l,o=this.t,n=this.r,l=this.b,d=this.balloonColor,u=this.fillColor,c=this.borderColor,m=u;void 0!=d&&(this.adjustBorderColor?m=c=d:u=d);var p=this.horizontalPadding,f=this.verticalPadding,g=this.pointerWidth,v=this.pointerOrientation,C=this.cornerRadius,A=i.fontFamily,b=this.fontSize;void 0==b&&(b=i.fontSize);var d=document.createElement("div"),x=d.style;x.position="absolute";d.innerHTML='<div style="max-width:'+this.maxWidth+"px; font-size:"+b+"px; color:"+this.color+"; font-family:"+A+'">'+this.text+"</div>";i.chartDiv.appendChild(d);this.textDiv=d;b=d.offsetWidth;A=d.offsetHeight;d.clientHeight&&(b=d.clientWidth,A=d.clientHeight);var A=A+2*f,y=b+2*p;window.opera&&(A+=2);var w,M=!1;w=this.offsetY;i.handDrawn&&(w+=i.handDrawScatter+2);"H"!=v?(b=t-y/2,e<o+A+10&&"down"!=v?(M=!0,s&&(e+=w),w=e+g,this.deltaSignY=-1):(s&&(e-=w),w=e-A-g,this.deltaSignY=1)):(2*g>A&&(g=A/2),w=e-A/2,t<h+(n-h)/2?(b=t+g,this.deltaSignX=-1):(b=t-y-g,this.deltaSignX=1));w+A>=l&&(w=l-A);w<o&&(w=o);b<h&&(b=h);b+y>n&&(b=n-y);var o=w+f,l=b+p,f=this.shadowAlpha,N=this.shadowColor,p=this.borderThickness,S=this.bulletSize,T;0<C||0===g?(0<f&&(t=AmCharts.rect(a,y,A,u,0,p+1,N,f,this.cornerRadius),AmCharts.isModern?t.translate(1,1):t.translate(4,4),r.push(t)),u=AmCharts.rect(a,y,A,u,this.fillAlpha,p,c,this.borderAlpha,this.cornerRadius),this.showBullet&&(T=AmCharts.circle(a,S,m,this.fillAlpha),r.push(T))):(m=[],C=[],"H"!=v?(h=t-b,h>y-g&&(h=y-g),h<g&&(h=g),m=[0,h-g,t-b,h+g,y,y,0,0],C=M?[0,0,e-w,0,0,A,A,0]:[A,A,e-w,A,A,0,0,A]):(m=e-w,m>A-g&&(m=A-g),m<g&&(m=g),C=[0,m-g,e-w,m+g,A,A,0,0],m=t<h+(n-h)/2?[0,0,b<t?0:t-b,0,0,y,y,0]:[y,y,b+y>t?y:t-b,y,y,0,0,y]),0<f&&(t=AmCharts.polygon(a,m,C,u,0,p,N,f),t.translate(1,1),r.push(t)),u=AmCharts.polygon(a,m,C,u,this.fillAlpha,p,c,this.borderAlpha));this.bg=u;r.push(u);u.toFront();a=1*this.deltaSignX;x.left=l+"px";x.top=o+"px";r.translate(b-a,w);u=u.getBBox();this.bottom=w+A+1;this.yPos=u.y+w;T&&T.translate(this.pointToX-b+a,e-w);e=this.animationDuration;0<this.animationDuration&&!s&&!isNaN(this.prevX)&&(r.translate(this.prevX,this.prevY),r.animate({translate:b-a+","+w},e,"easeOutSine"),d&&(x.left=this.prevTX+"px",x.top=this.prevTY+"px",this.xAnim=i.animate({node:d},"left",this.prevTX,l,e,"easeOutSine","px"),this.yAnim=i.animate({node:d},"top",this.prevTY,o,e,"easeOutSine","px")));this.prevX=b-a;this.prevY=w;this.prevTX=l;this.prevTY=o}}},followMouse:function(){if(this.follow&&this.show){var t=this.chart.mouseX-this.offsetX*this.deltaSignX,e=this.chart.mouseY;this.pointToX=t;this.pointToY=e;if(t!=this.previousX||e!=this.previousY)if(this.previousX=t,this.previousY=e,0===this.cornerRadius)this.draw();else{var i=this.set;if(i){var s=i.getBBox(),t=t-s.width/2,a=e-s.height-10;t<this.l&&(t=this.l);t>this.r-s.width&&(t=this.r-s.width);a<this.t&&(a=e+10);i.translate(t,a);e=this.textDiv.style;e.left=t+this.horizontalPadding+"px";e.top=a+this.verticalPadding+"px"}}}},changeColor:function(t){this.balloonColor=t},setBounds:function(t,e,i,s){this.l=t;this.t=e;this.r=i;this.b=s;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(t){this.text=t;this.show=!0;this.destroyTO&&clearTimeout(this.destroyTO);t=this.chart;this.fadeAnim1&&t.stopAnim(this.fadeAnim1);this.fadeAnim2&&t.stopAnim(this.fadeAnim2);this.draw()},hide:function(){var t=this,e=t.fadeOutDuration,i=t.chart;if(0<e){t.destroyTO=setTimeout(function(){t.destroy.call(t)},1e3*e);t.follow=!1;t.show=!1;var s=t.set;s&&(s.setAttr("opacity",t.fillAlpha),t.fadeAnim1=s.animate({opacity:0},e,"easeInSine"));t.textDiv&&(t.fadeAnim2=i.animate({node:t.textDiv},"opacity",1,0,e,"easeInSine",""))}else t.show=!1,t.follow=!1,t.destroy()},setPosition:function(t,e,i){this.pointToX=t;this.pointToY=e;i&&(t==this.previousX&&e==this.previousY||this.draw());this.previousX=t;this.previousY=e},followCursor:function(t){var e=this;(e.follow=t)?(e.pShowBullet=e.showBullet,e.showBullet=!1):void 0!==e.pShowBullet&&(e.showBullet=e.pShowBullet);clearInterval(e.interval);var i=e.chart.mouseX,s=e.chart.mouseY;!isNaN(i)&&t&&(e.pointToX=i-e.offsetX*e.deltaSignX,e.pointToY=s,e.followMouse(),e.interval=setInterval(function(){e.followMouse.call(e)},40))},removeDiv:function(){if(this.textDiv){var t=this.textDiv.parentNode;t&&t.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);AmCharts.remove(this.set);this.removeDiv();this.set=null}});AmCharts.AmCoordinateChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(t){AmCharts.AmCoordinateChart.base.construct.call(this,t);this.theme=t;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph");this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.gridAboveGraphs=!1;AmCharts.applyTheme(this,t,"AmCoordinateChart")},initChart:function(){AmCharts.AmCoordinateChart.base.initChart.call(this);var t=this.categoryAxis;t&&(this.categoryAxis=AmCharts.processObject(t,AmCharts.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();AmCharts.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&this.gridSet.toFront()},createValueAxes:function(){if(0===this.valueAxes.length){var t=new AmCharts.ValueAxis;this.addValueAxis(t)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(){var t=this.graphs,e,i={},s=this.seriesIdField;s||(s=this.categoryField);this.chartData=[];var a=this.dataProvider;if(a){var r=!1,h,o=this.categoryAxis,n;o&&(r=o.parseDates,n=o.forceShowField,h=o.categoryFunction);var l,d;r&&(e=AmCharts.extractPeriod(o.minPeriod),l=e.period,d=e.count);var u={};this.lookupTable=u;var c,m=this.dataDateFormat;for(c=0;c<a.length;c++){var p={},f=a[c];e=f[this.categoryField];p.category=h?h(e,f,o):String(e);n&&(p.forceShow=f[n]);u[f[s]]=p;r&&(e=o.categoryFunction?o.categoryFunction(e,f,o):e instanceof Date?"fff"==o.minPeriod?AmCharts.useUTC?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()):new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()):new Date(e):m?AmCharts.stringToDate(e,m):new Date(e),e=AmCharts.resetDateToMin(e,l,d,o.firstDayOfWeek),p.category=e,p.time=e.getTime());var g=this.valueAxes;p.axes={};p.x={};var v;for(v=0;v<g.length;v++){var C=g[v].id;p.axes[C]={};p.axes[C].graphs={};var A;for(A=0;A<t.length;A++){e=t[A];var b=e.id,x=e.periodValue;if(e.valueAxis.id==C){p.axes[C].graphs[b]={};var y={};y.index=c;var w=f;e.dataProvider&&(w=i);y.values=this.processValues(w,e,x);this.processFields(e,y,w);y.category=p.category;y.serialDataItem=p;y.graph=e;p.axes[C].graphs[b]=y}}}this.chartData[c]=p}}for(i=0;i<t.length;i++)e=t[i],e.dataProvider&&this.parseGraphData(e)},processValues:function(t,e,i){var s={},a,r=!1;"candlestick"!=e.type&&"ohlc"!=e.type||""===i||(r=!0);a=Number(t[e.valueField+i]);isNaN(a)||(s.value=a);a=Number(t[e.errorField+i]);isNaN(a)||(s.error=a);r&&(i="Open");a=Number(t[e.openField+i]);isNaN(a)||(s.open=a);r&&(i="Close");a=Number(t[e.closeField+i]);isNaN(a)||(s.close=a);r&&(i="Low");a=Number(t[e.lowField+i]);isNaN(a)||(s.low=a);r&&(i="High");a=Number(t[e.highField+i]);isNaN(a)||(s.high=a);return s},parseGraphData:function(t){var e=t.dataProvider,i=t.seriesIdField;i||(i=this.seriesIdField);i||(i=this.categoryField);var s;for(s=0;s<e.length;s++){var a=e[s],r=this.lookupTable[String(a[i])],h=t.valueAxis.id;r&&(h=r.axes[h].graphs[t.id],h.serialDataItem=r,h.values=this.processValues(a,t,t.periodValue),this.processFields(t,h,a))}},addValueAxis:function(t){t.chart=this;this.valueAxes.push(t);this.validateData()},removeValueAxesAndGraphs:function(){var t=this.valueAxes,e;for(e=t.length-1;-1<e;e--)this.removeValueAxis(t[e])},removeValueAxis:function(t){var e=this.graphs,i;for(i=e.length-1;0<=i;i--){var s=e[i];s&&s.valueAxis==t&&this.removeGraph(s)}e=this.valueAxes;for(i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1);this.validateData()},addGraph:function(t){this.graphs.push(t);this.chooseGraphColor(t,this.graphs.length-1);this.validateData()},removeGraph:function(t){var e=this.graphs,i;for(i=e.length-1;0<=i;i--)e[i]==t&&(e.splice(i,1),t.destroy());this.validateData()},processValueAxes:function(){var t=this.valueAxes,e;for(e=0;e<t.length;e++){var i=t[e],i=AmCharts.processObject(i,AmCharts.ValueAxis,this.theme);t[e]=i;i.chart=this;i.id||(i.id="valueAxis"+e+"_"+(new Date).getTime());if(!0===this.usePrefixes||!1===this.usePrefixes)i.usePrefixes=this.usePrefixes}},processGraphs:function(){var t=this.graphs,e;for(e=0;e<t.length;e++){var i=t[e],i=AmCharts.processObject(i,AmCharts.AmGraph,this.theme);t[e]=i;this.chooseGraphColor(i,e);i.chart=this;AmCharts.isString(i.valueAxis)&&(i.valueAxis=this.getValueAxisById(i.valueAxis));i.valueAxis||(i.valueAxis=this.valueAxes[0]);i.id||(i.id="graph"+e+"_"+(new Date).getTime())}},formatString:function(t,e){var i=e.graph,s=i.valueAxis;s.duration&&e.values.value&&(s=AmCharts.formatDuration(e.values.value,s.duration,"",s.durationUnits,s.maxInterval,s.numberFormatter),t=t.split("[[value]]").join(s));t=AmCharts.massReplace(t,{"[[title]]":i.title,"[[description]]":e.description});t=AmCharts.fixBrakes(t);return t=AmCharts.cleanFromEmpty(t)},getBalloonColor:function(t,e,i){var s=t.lineColor,a=t.balloonColor;i&&(a=s);i=t.fillColors;"object"==typeof i?s=i[0]:void 0!==i&&(s=i);e.isNegative&&(i=t.negativeLineColor,t=t.negativeFillColors,"object"==typeof t?i=t[0]:void 0!==t&&(i=t),void 0!==i&&(s=i));void 0!==e.color&&(s=e.color);void 0===a&&(a=s);return a},getGraphById:function(t){return AmCharts.getObjById(this.graphs,t)},getValueAxisById:function(t){return AmCharts.getObjById(this.valueAxes,t)},processFields:function(t,e,i){if(t.itemColors){var s=t.itemColors,a=e.index;e.color=a<s.length?s[a]:AmCharts.randomColor()}s="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern".split(" ");for(a=0;a<s.length;a++){var r=s[a],h=t[r+"Field"];h&&(h=i[h],AmCharts.isDefined(h)&&(e[r]=h))}e.dataContext=i},chooseGraphColor:function(t,e){if(!t.lineColor){var i;i=this.colors.length>e?this.colors[e]:AmCharts.randomColor();t.lineColor=i}if(i=this.patterns)t.pattern=i[e]},handleLegendEvent:function(t){var e=t.type;t=t.dataItem;if(!this.legend.data&&t){var i=t.hidden,s=t.showBalloon;switch(e){case"clickMarker":s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t);break;case"clickLabel":s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t);break;case"rollOverItem":i||this.highlightGraph(t);break;case"rollOutItem":i||this.unhighlightGraph();break;case"hideItem":this.hideGraph(t);break;case"showItem":this.showGraph(t)}}},highlightGraph:function(t){var e=this.graphs,i,s=.2;this.legend&&(s=this.legend.rollOverGraphAlpha);if(1!=s)for(i=0;i<e.length;i++){var a=e[i];a!=t&&a.changeOpacity(s)}},unhighlightGraph:function(){var t;this.legend&&(t=this.legend.rollOverGraphAlpha);if(1!=t){t=this.graphs;var e;for(e=0;e<t.length;e++)t[e].changeOpacity(1)}},showGraph:function(t){t.hidden=!1;this.dataChanged=!0;this.marginsUpdated=!1;this.chartCreated&&this.initChart()},hideGraph:function(t){this.dataChanged=!0;this.marginsUpdated=!1;t.hidden=!0;this.chartCreated&&this.initChart()},hideGraphsBalloon:function(t){t.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(t){t.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var t=this.graphs;if(t){var e;for(e=0;e<t.length;e++)t[e].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}});AmCharts.AmSlicedChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(t){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");AmCharts.AmSlicedChart.base.construct.call(this,t);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other";this.groupedPulled=!1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget="_self";this.autoMarginOffset=10;this.gradientRatio=[];AmCharts.applyTheme(this,t,"AmSlicedChart")},initChart:function(){AmCharts.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.setLegendData(this.chartData));this.drawChart()},handleLegendEvent:function(t){var e=t.type;t=t.dataItem;if(!this.legend.data&&t){var i=t.hidden;switch(e){case"clickMarker":i||this.clickSlice(t);break;case"clickLabel":i||this.clickSlice(t);break;case"rollOverItem":i||this.rollOverSlice(t,!1);break;case"rollOutItem":i||this.rollOutSlice(t);break;case"hideItem":this.hideSlice(t);break;case"showItem":this.showSlice(t)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var t=this.legend;t&&t.invalidateSize()},addEventListeners:function(t,e){var i=this;t.mouseover(function(t){i.rollOverSlice(e,!0,t)}).mouseout(function(t){i.rollOutSlice(e,t)}).touchend(function(t){i.rollOverSlice(e,t);i.panEventsEnabled&&i.clickSlice(e,t)}).touchstart(function(t){i.rollOverSlice(e,t)}).click(function(t){i.clickSlice(e,t)}).contextmenu(function(t){i.handleRightClick(e,t)})},formatString:function(t,e){t=AmCharts.formatValue(t,e,["value"],this.numberFormatter,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);t=AmCharts.formatValue(t,e,["percents"],this.percentFormatter);t=AmCharts.massReplace(t,{"[[title]]":e.title,"[[description]]":e.description});-1!=t.indexOf("[[")&&(t=AmCharts.formatDataContextValue(t,e.dataContext));t=AmCharts.fixBrakes(t);return t=AmCharts.cleanFromEmpty(t)},startSlices:function(){var t;for(t=0;t<this.chartData.length;t++)0<this.startDuration&&this.sequencedAnimation?this.setStartTO(t):this.startSlice(this.chartData[t])},setStartTO:function(t){var e=this;t=setTimeout(function(){e.startSequenced.call(e)},e.startDuration/e.chartData.length*500*t);e.timeOuts.push(t)},pullSlices:function(t){var e=this.chartData,i;for(i=0;i<e.length;i++){var s=e[i];s.pulled&&this.pullSlice(s,1,t)}},startSequenced:function(){var t=this.chartData,e;for(e=0;e<t.length;e++)if(!t[e].started){this.startSlice(this.chartData[e]);break}},startSlice:function(t){t.started=!0;var e=t.wedge,i=this.startDuration;e&&0<i&&(0<t.alpha&&e.show(),e.translate(t.startX,t.startY),e.animate({opacity:1,translate:"0,0"},i,this.startEffect))},showLabels:function(){var t=this.chartData,e;for(e=0;e<t.length;e++){var i=t[e];if(0<i.alpha){var s=i.label;s&&s.show();(i=i.tick)&&i.show()}}},showSlice:function(t){isNaN(t)?t.hidden=!1:this.chartData[t].hidden=!1;this.invalidateVisibility()},hideSlice:function(t){isNaN(t)?t.hidden=!0:this.chartData[t].hidden=!0;this.hideBalloon();this.invalidateVisibility()},rollOverSlice:function(t,e,i){isNaN(t)||(t=this.chartData[t]);clearTimeout(this.hoverInt);this.pullOnHover&&this.pullSlice(t,1);1>this.hoverAlpha&&t.wedge&&t.wedge.attr({opacity:this.hoverAlpha});var s=t.balloonX,a=t.balloonY;t.pulled&&(s+=t.pullX,a+=t.pullY);var r=this.formatString(this.balloonText,t),h=AmCharts.adjustLuminosity(t.color,-.15);this.showBalloon(r,h,e,s,a);t={type:"rollOverSlice",dataItem:t,chart:this,event:i};this.fire(t.type,t)},rollOutSlice:function(t,e){isNaN(t)||(t=this.chartData[t]);t.wedge&&t.wedge.attr({opacity:1});this.hideBalloon();var i={type:"rollOutSlice",dataItem:t,chart:this,event:e};this.fire(i.type,i)},clickSlice:function(t,e){isNaN(t)||(t=this.chartData[t]);t.pulled?this.pullSlice(t,0):this.pullSlice(t,1);AmCharts.getURL(t.url,this.urlTarget);var i={type:"clickSlice",dataItem:t,chart:this,event:e};this.fire(i.type,i)},handleRightClick:function(t,e){isNaN(t)||(t=this.chartData[t]);var i={type:"rightClickSlice",dataItem:t,chart:this,event:e};this.fire(i.type,i)},drawTicks:function(){var t=this.chartData,e;for(e=0;e<t.length;e++){var i=t[e];if(i.label){var s=i.ty,s=AmCharts.line(this.container,[i.tx0,i.tx,i.tx2],[i.ty0,s,s],this.labelTickColor,this.labelTickAlpha);i.tick=s;i.wedge.push(s)}}},initialStart:function(){var t=this,e=t.startDuration,i=setTimeout(function(){t.showLabels.call(t)},1e3*e);t.timeOuts.push(i);t.chartCreated?t.pullSlices(!0):(e=setTimeout(function(){t.pullSlices.call(t)},1200*e),t.timeOuts.push(e),t.startSlices())},pullSlice:function(t,e,i){var s=this.pullOutDuration;!0===i&&(s=0);(i=t.wedge)&&i.animate({translate:e*t.pullX+","+e*t.pullY},s,this.pullOutEffect);1==e?(t.pulled=!0,this.pullOutOnlyOne&&this.pullInAll(t.index),t={type:"pullOutSlice",dataItem:t,chart:this}):(t.pulled=!1,t={type:"pullInSlice",dataItem:t,chart:this});this.fire(t.type,t)},pullInAll:function(t){var e=this.chartData,i;for(i=0;i<this.chartData.length;i++)i!=t&&e[i].pulled&&this.pullSlice(e[i],0)},pullOutAll:function(t){t=this.chartData;var e;for(e=0;e<t.length;e++)t[e].pulled||this.pullSlice(t[e],1)},parseData:function(){var t=[];this.chartData=t;var e=this.dataProvider;isNaN(this.pieAlpha)||(this.alpha=this.pieAlpha);if(void 0!==e){var i=e.length,s=0,a,r,h;for(a=0;a<i;a++){r={};var o=e[a];r.dataContext=o;r.value=Number(o[this.valueField]);(h=o[this.titleField])||(h="");r.title=h;r.pulled=AmCharts.toBoolean(o[this.pulledField],!1);(h=o[this.descriptionField])||(h="");r.description=h;r.labelRadius=Number(o[this.labelRadiusField]);r.url=o[this.urlField];h=o[this.patternField];!h&&this.patterns&&(h=this.patterns[a]);r.pattern=h;r.visibleInLegend=AmCharts.toBoolean(o[this.visibleInLegendField],!0);h=o[this.alphaField];r.alpha=void 0!==h?Number(h):this.alpha;h=o[this.colorField];void 0!==h&&(r.color=AmCharts.toColor(h));r.labelColor=AmCharts.toColor(o[this.labelColorField]);s+=r.value;r.hidden=!1;t[a]=r}for(a=e=0;a<i;a++)r=t[a],r.percents=r.value/s*100,r.percents<this.groupPercent&&e++;1<e&&(this.groupValue=0,this.removeSmallSlices(),t.push({title:this.groupedTitle,value:this.groupValue,percents:this.groupValue/s*100,pulled:this.groupedPulled,color:this.groupedColor,url:this.groupedUrl,description:this.groupedDescription,alpha:this.groupedAlpha,pattern:this.groupedPattern}));i=this.baseColor;i||(i=this.pieBaseColor);s=this.brightnessStep;s||(s=this.pieBrightnessStep);for(a=0;a<t.length;a++)i?h=AmCharts.adjustLuminosity(i,a*s/100):(h=this.colors[a],void 0===h&&(h=AmCharts.randomColor())),void 0===t[a].color&&(t[a].color=h);this.recalculatePercents()}},recalculatePercents:function(){var t=this.chartData,e=0,i,s;for(i=0;i<t.length;i++)s=t[i],!s.hidden&&0<s.value&&(e+=s.value);for(i=0;i<t.length;i++)s=this.chartData[i],s.percents=!s.hidden&&0<s.value?100*s.value/e:0},removeSmallSlices:function(){var t=this.chartData,e;for(e=t.length-1;0<=e;e--)t[e].percents<this.groupPercent&&(this.groupValue+=t[e].value,t.splice(e,1))},animateAgain:function(){var t=this;t.startSlices();var e=setTimeout(function(){t.pullSlices.call(t)},1200*t.startDuration);t.timeOuts.push(e)},measureMaxLabel:function(){var t=this.chartData,e=0,i;for(i=0;i<t.length;i++){var s=this.formatString(this.labelText,t[i]),s=AmCharts.text(this.container,s,this.color,this.fontFamily,this.fontSize),a=s.getBBox().width;a>e&&(e=a);s.remove()}return e}});AmCharts.AmRectangularChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(t){AmCharts.AmRectangularChart.base.construct.call(this,t);this.theme=t;this.createEvents("zoomed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.verticalPosition=this.horizontalPosition=this.depth3D=this.angle=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomOutButtonImageSize=17;this.zoomOutButtonImage="lens.png";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;AmCharts.applyTheme(this,t,"AmRectangularChart")},initChart:function(){AmCharts.AmRectangularChart.base.initChart.call(this);this.updateDxy();var t=!0;!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),t=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();t&&(this.scrollbarOnly||this.updateGraphs())},drawChart:function(){AmCharts.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(AmCharts.ifArray(this.chartData)){var t=this.chartCursor;t&&t.draw();t=this.zoomOutText;""!==t&&t&&this.drawZoomOutButton()}},resetMargins:function(){var t={},e;if("serial"==this.chartType||"gantt"==this.chartType){var i=this.valueAxes;for(e=0;e<i.length;e++){var s=i[e];s.ignoreAxisWidth||(s.setOrientation(this.rotate),s.fixAxisPosition(),t[s.position]=!0)}(e=this.categoryAxis)&&!e.ignoreAxisWidth&&(e.setOrientation(!this.rotate),e.fixAxisPosition(),e.fixAxisPosition(),t[e.position]=!0)}else{s=this.xAxes;i=this.yAxes;for(e=0;e<s.length;e++){var a=s[e];a.ignoreAxisWidth||(a.setOrientation(!0),a.fixAxisPosition(),t[a.position]=!0)}for(e=0;e<i.length;e++)s=i[e],s.ignoreAxisWidth||(s.setOrientation(!1),s.fixAxisPosition(),t[s.position]=!0)}t.left&&(this.marginLeft=0);t.right&&(this.marginRight=0);t.top&&(this.marginTop=0);t.bottom&&(this.marginBottom=0);this.fixMargins=t},measureMargins:function(){var t=this.valueAxes,e,i=this.autoMarginOffset,s=this.fixMargins,a=this.realWidth,r=this.realHeight,h=i,o=i,n=a-i;e=r-i;var l;for(l=0;l<t.length;l++)e=this.getAxisBounds(t[l],h,n,o,e),h=e.l,n=e.r,o=e.t,e=e.b;if(t=this.categoryAxis)e=this.getAxisBounds(t,h,n,o,e),
h=e.l,n=e.r,o=e.t,e=e.b;s.left&&h<i&&(this.marginLeft=Math.round(-h+i));s.right&&n>a-i&&(this.marginRight=Math.round(n-a+i));s.top&&o<i+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-o+i+this.titleHeight));s.bottom&&e>r-i&&(this.marginBottom=Math.round(e-r+i));this.initChart()},getAxisBounds:function(t,e,i,s,a){if(!t.ignoreAxisWidth){var r=t.labelsSet,h=t.tickLength;t.inside&&(h=0);if(r)switch(r=t.getBBox(),t.position){case"top":t=r.y;s>t&&(s=t);break;case"bottom":t=r.y+r.height;a<t&&(a=t);break;case"right":t=r.x+r.width+h+3;i<t&&(i=t);break;case"left":t=r.x-h,e>t&&(e=t)}}return{l:e,t:s,r:i,b:a}},drawZoomOutButton:function(){var t=this,e=t.container.set();t.zoomButtonSet.push(e);var i=t.color,s=t.fontSize,a=t.zoomOutButtonImageSize,r=t.zoomOutButtonImage,h=t.zoomOutText,o=t.zoomOutButtonColor,n=t.zoomOutButtonAlpha,l=t.zoomOutButtonFontSize,d=t.zoomOutButtonPadding;isNaN(l)||(s=l);(l=t.zoomOutButtonFontColor)&&(i=l);var l=t.zoomOutButton,u;l&&(l.fontSize&&(s=l.fontSize),l.color&&(i=l.color),l.backgroundColor&&(o=l.backgroundColor),isNaN(l.backgroundAlpha)||(t.zoomOutButtonRollOverAlpha=l.backgroundAlpha));var c=l=0;void 0!==t.pathToImages&&r&&(u=t.container.image(t.pathToImages+r,0,0,a,a),e.push(u),u=u.getBBox(),l=u.width+5);void 0!==h&&(i=AmCharts.text(t.container,h,i,t.fontFamily,s,"start"),s=i.getBBox(),c=u?u.height/2-3:s.height/2,i.translate(l,c),e.push(i));u=e.getBBox();o=AmCharts.rect(t.container,u.width+2*d+5,u.height+2*d-2,o,1,1,o,1);o.setAttr("opacity",n);o.translate(-d,-d);e.push(o);o.toBack();t.zbBG=o;u=o.getBBox();e.translate(t.marginLeftReal+t.plotAreaWidth-u.width+d,t.marginTopReal+d);e.hide();e.mouseover(function(){t.rollOverZB()}).mouseout(function(){t.rollOutZB()}).click(function(){t.clickZB()}).touchstart(function(){t.rollOverZB()}).touchend(function(){t.rollOutZB();t.clickZB()});for(n=0;n<e.length;n++)e[n].attr({cursor:"pointer"});t.zbSet=e},rollOverZB:function(){this.zbBG.setAttr("opacity",this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.zoomOut()},zoomOut:function(){this.updateScrollbar=!0;this.zoom()},drawPlotArea:function(){var t=this.dx,e=this.dy,i=this.marginLeftReal,s=this.marginTopReal,a=this.plotAreaWidth-1,r=this.plotAreaHeight-1,h=this.plotAreaFillColors,o=this.plotAreaFillAlphas,n=this.plotAreaBorderColor,l=this.plotAreaBorderAlpha;this.trendLinesSet.clipRect(i,s,a,r);"object"==typeof o&&(o=o[0]);h=AmCharts.polygon(this.container,[0,a,a,0],[0,0,r,r],h,o,1,n,l,this.plotAreaGradientAngle);h.translate(i+t,s+e);h.node.setAttribute("class","amChartsPlotArea");this.set.push(h);0!==t&&0!==e&&(h=this.plotAreaFillColors,"object"==typeof h&&(h=h[0]),h=AmCharts.adjustLuminosity(h,-.15),a=AmCharts.polygon(this.container,[0,t,a+t,a,0],[0,e,e,0,0],h,o,1,n,l),a.translate(i,s+r),this.set.push(a),t=AmCharts.polygon(this.container,[0,0,t,t,0],[0,r,r+e,e,0],h,o,1,n,l),t.translate(i,s),this.set.push(t))},updatePlotArea:function(){var t=this.updateWidth(),e=this.updateHeight(),i=this.container;this.realWidth=t;this.realWidth=e;i&&this.container.setSize(t,e);t=t-this.marginLeftReal-this.marginRightReal-this.dx;e=e-this.marginTopReal-this.marginBottomReal;1>t&&(t=1);1>e&&(e=1);this.plotAreaWidth=Math.round(t);this.plotAreaHeight=Math.round(e)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var t=this.getTitleHeight();this.titleHeight=t;this.marginTopReal=this.marginTop-this.dy+t;this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var t=this.valueAxes,e=this.marginLeftReal,i=this.marginTopReal,s=this.plotAreaHeight,a=this.plotAreaWidth,r;for(r=0;r<t.length;r++){var h=t[r];h.axisRenderer=AmCharts.RecAxis;h.guideFillRenderer=AmCharts.RecFill;h.axisItemRenderer=AmCharts.RecItem;h.dx=this.dx;h.dy=this.dy;h.viW=a-1;h.viH=s-1;h.marginsChanged=!0;h.viX=e;h.viY=i;this.updateObjectSize(h)}},updateObjectSize:function(t){t.width=(this.plotAreaWidth-1)*this.widthMultiplier;t.height=(this.plotAreaHeight-1)*this.heightMultiplier;t.x=this.marginLeftReal+this.horizontalPosition;t.y=this.marginTopReal+this.verticalPosition},updateGraphs:function(){var t=this.graphs,e;for(e=0;e<t.length;e++){var i=t[e];i.x=this.marginLeftReal+this.horizontalPosition;i.y=this.marginTopReal+this.verticalPosition;i.width=this.plotAreaWidth*this.widthMultiplier;i.height=this.plotAreaHeight*this.heightMultiplier;i.index=e;i.dx=this.dx;i.dy=this.dy;i.rotate=this.rotate;i.chartType=this.chartType}},updateChartCursor:function(){var t=this.chartCursor;t&&(t=AmCharts.processObject(t,AmCharts.ChartCursor,this.theme),this.addChartCursor(t),t.x=this.marginLeftReal,t.y=this.marginTopReal,t.width=this.plotAreaWidth-1,t.height=this.plotAreaHeight-1,t.chart=this)},processScrollbars:function(){var t=this.chartScrollbar;t&&(t=AmCharts.processObject(t,AmCharts.ChartScrollbar,this.theme),this.addChartScrollbar(t))},updateScrollbars:function(){},addChartCursor:function(t){AmCharts.callMethod("destroy",[this.chartCursor]);t&&(this.listenTo(t,"changed",this.handleCursorChange),this.listenTo(t,"zoomed",this.handleCursorZoom));this.chartCursor=t},removeChartCursor:function(){AmCharts.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){var t=this.trendLines,e;for(e=0;e<t.length;e++){var i=t[e];i.valueAxis.recalculateToPercents?i.set&&i.set.hide():(i.x=this.marginLeftReal+this.horizontalPosition,i.y=this.marginTopReal+this.verticalPosition,i.draw())}},addTrendLine:function(t){this.trendLines.push(t)},removeTrendLine:function(t){var e=this.trendLines,i;for(i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1)},adjustMargins:function(t,e){var i=t.scrollbarHeight;"top"==t.position?e?this.marginLeftReal+=i:this.marginTopReal+=i:e?this.marginRightReal+=i:this.marginBottomReal+=i},getScrollbarPosition:function(t,e,i){t.position=e?"bottom"==i||"left"==i?"bottom":"top":"top"==i||"right"==i?"bottom":"top"},updateChartScrollbar:function(t,e){if(t){t.rotate=e;var i=this.marginTopReal,s=this.marginLeftReal,a=t.scrollbarHeight,r=this.dx,h=this.dy;"top"==t.position?e?(t.y=i,t.x=s-a):(t.y=i-a+h-1,t.x=s+r):e?(t.y=i+h,t.x=s+this.plotAreaWidth+r):(t.y=i+this.plotAreaHeight,t.x=this.marginLeftReal)}},showZB:function(t){var e=this.zbSet;e&&(t?e.show():e.hide(),this.rollOutZB())},handleReleaseOutside:function(t){AmCharts.AmRectangularChart.base.handleReleaseOutside.call(this,t);(t=this.chartCursor)&&t.handleReleaseOutside()},handleMouseDown:function(t){AmCharts.AmRectangularChart.base.handleMouseDown.call(this,t);var e=this.chartCursor;e&&e.handleMouseDown(t)},handleCursorChange:function(t){}});AmCharts.TrendLine=AmCharts.Class({construct:function(t){this.createEvents("click");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;AmCharts.applyTheme(this,t,"TrendLine")},draw:function(){var t=this;t.destroy();var e=t.chart,i=e.container,s,a,r,h,o=t.categoryAxis,n=t.initialDate,l=t.initialCategory,d=t.finalDate,u=t.finalCategory,c=t.valueAxis,m=t.valueAxisX,p=t.initialXValue,f=t.finalXValue,g=t.initialValue,v=t.finalValue,C=c.recalculateToPercents,A=e.dataDateFormat;o&&(n&&(n instanceof Date||(n=A?AmCharts.stringToDate(n,A):new Date(n)),t.initialDate=n,s=o.dateToCoordinate(n)),l&&(s=o.categoryToCoordinate(l)),d&&(d instanceof Date||(d=A?AmCharts.stringToDate(d,A):new Date(d)),t.finalDate=d,a=o.dateToCoordinate(d)),u&&(a=o.categoryToCoordinate(u)));m&&!C&&(isNaN(p)||(s=m.getCoordinate(p)),isNaN(f)||(a=m.getCoordinate(f)));c&&!C&&(isNaN(g)||(r=c.getCoordinate(g)),isNaN(v)||(h=c.getCoordinate(v)));isNaN(s)||isNaN(a)||isNaN(r)||isNaN(r)||(e.rotate?(o=[r,h],a=[s,a]):(o=[s,a],a=[r,h]),r=t.lineColor,s=AmCharts.line(i,o,a,r,t.lineAlpha,t.lineThickness,t.dashLength),h=o,n=a,u=o[1]-o[0],c=a[1]-a[0],0===u&&(u=.01),0===c&&(c=.01),l=u/Math.abs(u),d=c/Math.abs(c),c=u*c/Math.abs(u*c)*Math.sqrt(Math.pow(u,2)+Math.pow(c,2)),u=Math.asin(u/c),c=90*Math.PI/180-u,u=Math.abs(5*Math.cos(c)),c=Math.abs(5*Math.sin(c)),h.push(o[1]-l*c,o[0]-l*c),n.push(a[1]+d*u,a[0]+d*u),o=AmCharts.polygon(i,h,n,r,.005,0),i=i.set([o,s]),i.translate(e.marginLeftReal,e.marginTopReal),e.trendLinesSet.push(i),t.line=s,t.set=i,o.mouseup(function(){t.handleLineClick()}).mouseover(function(){t.handleLineOver()}).mouseout(function(){t.handleLineOut()}),o.touchend&&o.touchend(function(){t.handleLineClick()}))},handleLineClick:function(){var t={type:"click",trendLine:this,chart:this.chart};this.fire(t.type,t)},handleLineOver:function(){var t=this.rollOverColor;void 0!==t&&this.line.attr({stroke:t})},handleLineOut:function(){this.line.attr({stroke:this.lineColor})},destroy:function(){AmCharts.remove(this.set)}});AmCharts.circle=function(t,e,i,s,a,r,h,o){if(void 0==a||0===a)a=.01;void 0===r&&(r="#000000");void 0===h&&(h=0);s={fill:i,stroke:r,"fill-opacity":s,"stroke-width":a,"stroke-opacity":h};t=t.circle(0,0,e).attr(s);o&&t.gradient("radialGradient",[i,AmCharts.adjustLuminosity(i,-.6)]);return t};AmCharts.text=function(t,e,i,s,a,r,h,o){r||(r="middle");"right"==r&&(r="end");isNaN(o)&&(o=1);void 0!==e&&(e=String(e),AmCharts.isIE&&!AmCharts.isModern&&(e=e.replace("&amp;","&"),e=e.replace("&","&amp;")));i={fill:i,"font-family":s,"font-size":a,opacity:o};!0===h&&(i["font-weight"]="bold");i["text-anchor"]=r;return t.text(e,i)};AmCharts.polygon=function(t,e,i,s,a,r,h,o,n,l,d){isNaN(r)&&(r=.01);isNaN(o)&&(o=a);var u=s,c=!1;"object"==typeof u&&1<u.length&&(c=!0,u=u[0]);void 0===h&&(h=u);a={fill:u,stroke:h,"fill-opacity":a,"stroke-width":r,"stroke-opacity":o};void 0!==d&&0<d&&(a["stroke-dasharray"]=d);d=AmCharts.dx;r=AmCharts.dy;t.handDrawn&&(i=AmCharts.makeHD(e,i,t.handDrawScatter),e=i[0],i=i[1]);h=Math.round;l&&(h=AmCharts.doNothing);l="M"+(h(e[0])+d)+","+(h(i[0])+r);for(o=1;o<e.length;o++)l+=" L"+(h(e[o])+d)+","+(h(i[o])+r);t=t.path(l+" Z").attr(a);c&&t.gradient("linearGradient",s,n);return t};AmCharts.rect=function(t,e,i,s,a,r,h,o,n,l,d){isNaN(r)&&(r=0);void 0===n&&(n=0);void 0===l&&(l=270);isNaN(a)&&(a=0);var u=s,c=!1;"object"==typeof u&&(u=u[0],c=!0);void 0===h&&(h=u);void 0===o&&(o=a);e=Math.round(e);i=Math.round(i);var m=0,p=0;0>e&&(e=Math.abs(e),m=-e);0>i&&(i=Math.abs(i),p=-i);m+=AmCharts.dx;p+=AmCharts.dy;a={fill:u,stroke:h,"fill-opacity":a,"stroke-opacity":o};void 0!==d&&0<d&&(a["stroke-dasharray"]=d);t=t.rect(m,p,e,i,n,r).attr(a);c&&t.gradient("linearGradient",s,l);return t};AmCharts.bullet=function(t,e,i,s,a,r,h,o,n,l,d){var u;"circle"==e&&(e="round");switch(e){case"round":u=AmCharts.circle(t,i/2,s,a,r,h,o);break;case"square":u=AmCharts.polygon(t,[-i/2,i/2,i/2,-i/2],[i/2,i/2,-i/2,-i/2],s,a,r,h,o,l-180);break;case"rectangle":u=AmCharts.polygon(t,[-i,i,i,-i],[i/2,i/2,-i/2,-i/2],s,a,r,h,o,l-180);break;case"diamond":u=AmCharts.polygon(t,[-i/2,0,i/2,0],[0,-i/2,0,i/2],s,a,r,h,o);break;case"triangleUp":u=AmCharts.triangle(t,i,0,s,a,r,h,o);break;case"triangleDown":u=AmCharts.triangle(t,i,180,s,a,r,h,o);break;case"triangleLeft":u=AmCharts.triangle(t,i,270,s,a,r,h,o);break;case"triangleRight":u=AmCharts.triangle(t,i,90,s,a,r,h,o);break;case"bubble":u=AmCharts.circle(t,i/2,s,a,r,h,o,!0);break;case"yError":u=t.set();u.push(AmCharts.line(t,[0,0],[-i/2,i/2],s,a,r));u.push(AmCharts.line(t,[-n,n],[-i/2,-i/2],s,a,r));u.push(AmCharts.line(t,[-n,n],[i/2,i/2],s,a,r));break;case"xError":u=t.set(),u.push(AmCharts.line(t,[-i/2,i/2],[0,0],s,a,r)),u.push(AmCharts.line(t,[-i/2,-i/2],[-n,n],s,a,r)),u.push(AmCharts.line(t,[i/2,i/2],[-n,n],s,a,r))}u&&u.pattern(d);return u};AmCharts.triangle=function(t,e,i,s,a,r,h,o){if(void 0===r||0===r)r=1;void 0===h&&(h="#000");void 0===o&&(o=0);s={fill:s,stroke:h,"fill-opacity":a,"stroke-width":r,"stroke-opacity":o};e/=2;var n;0===i&&(n=" M"+-e+","+e+" L0,"+-e+" L"+e+","+e+" Z");180==i&&(n=" M"+-e+","+-e+" L0,"+e+" L"+e+","+-e+" Z");90==i&&(n=" M"+-e+","+-e+" L"+e+",0 L"+-e+","+e+" Z");270==i&&(n=" M"+-e+",0 L"+e+","+e+" L"+e+","+-e+" Z");return t.path(n).attr(s)};AmCharts.line=function(t,e,i,s,a,r,h,o,n,l,d){if(t.handDrawn&&!d)return AmCharts.handDrawnLine(t,e,i,s,a,r,h,o,n,l,d);r={fill:"none","stroke-width":r};void 0!==h&&0<h&&(r["stroke-dasharray"]=h);isNaN(a)||(r["stroke-opacity"]=a);s&&(r.stroke=s);s=Math.round;l&&(s=AmCharts.doNothing);l=AmCharts.dx;a=AmCharts.dy;h="M"+(s(e[0])+l)+","+(s(i[0])+a);for(o=1;o<e.length;o++)h+=" L"+(s(e[o])+l)+","+(s(i[o])+a);if(AmCharts.VML)return t.path(h,void 0,!0).attr(r);n&&(h+=" M0,0 L0,0");return t.path(h).attr(r)};AmCharts.makeHD=function(t,e,i){for(var s=[],a=[],r=1;r<t.length;r++)for(var h=Number(t[r-1]),o=Number(e[r-1]),n=Number(t[r]),l=Number(e[r]),d=Math.sqrt(Math.pow(n-h,2)+Math.pow(l-o,2)),d=Math.round(d/50)+1,n=(n-h)/d,l=(l-o)/d,u=0;u<=d;u++){var c=h+u*n+Math.random()*i,m=o+u*l+Math.random()*i;s.push(c);a.push(m)}return[s,a]};AmCharts.handDrawnLine=function(t,e,i,s,a,r,h,o,n,l,d){var u=t.set();for(d=1;d<e.length;d++)for(var c=[e[d-1],e[d]],m=[i[d-1],i[d]],m=AmCharts.makeHD(c,m,t.handDrawScatter),c=m[0],m=m[1],p=1;p<c.length;p++)u.push(AmCharts.line(t,[c[p-1],c[p]],[m[p-1],m[p]],s,a,r+Math.random()*t.handDrawThickness-t.handDrawThickness/2,h,o,n,l,!0));return u};AmCharts.doNothing=function(t){return t};AmCharts.wedge=function(t,e,i,s,a,r,h,o,n,l,d,u){var c=Math.round;r=c(r);h=c(h);o=c(o);var m=c(h/r*o),p=AmCharts.VML,f=359.5+r/100;359.94<f&&(f=359.94);a>=f&&(a=f);var g=1/180*Math.PI,f=e+Math.sin(s*g)*o,v=i-Math.cos(s*g)*m,C=e+Math.sin(s*g)*r,A=i-Math.cos(s*g)*h,b=e+Math.sin((s+a)*g)*r,x=i-Math.cos((s+a)*g)*h,y=e+Math.sin((s+a)*g)*o,g=i-Math.cos((s+a)*g)*m,w={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},M=0;180<Math.abs(a)&&(M=1);s=t.set();var N;p&&(f=c(10*f),C=c(10*C),b=c(10*b),y=c(10*y),v=c(10*v),A=c(10*A),x=c(10*x),g=c(10*g),e=c(10*e),n=c(10*n),i=c(10*i),r*=10,h*=10,o*=10,m*=10,1>Math.abs(a)&&1>=Math.abs(b-C)&&1>=Math.abs(x-A)&&(N=!0));a="";var S;0<n&&(p?(S=" M"+f+","+(v+n)+" L"+C+","+(A+n),N||(S+=" A"+(e-r)+","+(n+i-h)+","+(e+r)+","+(n+i+h)+","+C+","+(A+n)+","+b+","+(x+n)),S+=" L"+y+","+(g+n),0<o&&(N||(S+=" B"+(e-o)+","+(n+i-m)+","+(e+o)+","+(n+i+m)+","+y+","+(n+g)+","+f+","+(n+v)))):(S=" M"+f+","+(v+n)+" L"+C+","+(A+n)+(" A"+r+","+h+",0,"+M+",1,"+b+","+(x+n)+" L"+y+","+(g+n)),0<o&&(S+=" A"+o+","+m+",0,"+M+",0,"+f+","+(v+n))),S+=" Z",S=t.path(S,void 0,void 0,"1000,1000").attr(w),s.push(S),S=t.path(" M"+f+","+v+" L"+f+","+(v+n)+" L"+C+","+(A+n)+" L"+C+","+A+" L"+f+","+v+" Z",void 0,void 0,"1000,1000").attr(w),n=t.path(" M"+b+","+x+" L"+b+","+(x+n)+" L"+y+","+(g+n)+" L"+y+","+g+" L"+b+","+x+" Z",void 0,void 0,"1000,1000").attr(w),s.push(S),s.push(n));p?(N||(a=" A"+c(e-r)+","+c(i-h)+","+c(e+r)+","+c(i+h)+","+c(C)+","+c(A)+","+c(b)+","+c(x)),r=" M"+c(f)+","+c(v)+" L"+c(C)+","+c(A)+a+" L"+c(y)+","+c(g)):r=" M"+f+","+v+" L"+C+","+A+(" A"+r+","+h+",0,"+M+",1,"+b+","+x)+" L"+y+","+g;0<o&&(p?N||(r+=" B"+(e-o)+","+(i-m)+","+(e+o)+","+(i+m)+","+y+","+g+","+f+","+v):r+=" A"+o+","+m+",0,"+M+",0,"+f+","+v);t.handDrawn&&(e=AmCharts.line(t,[f,C],[v,A],l.stroke,l.thickness*Math.random()*t.handDrawThickness,l["stroke-opacity"]),s.push(e));t=t.path(r+" Z",void 0,void 0,"1000,1000").attr(l);if(d){e=[];for(i=0;i<d.length;i++)e.push(AmCharts.adjustLuminosity(l.fill,d[i]));0<e.length&&t.gradient("linearGradient",e)}t.pattern(u);s.push(t);return s};AmCharts.adjustLuminosity=function(t,e){t=String(t).replace(/[^0-9a-f]/gi,"");6>t.length&&(t=String(t[0])+String(t[0])+String(t[1])+String(t[1])+String(t[2])+String(t[2]));e=e||0;var i="#",s,a;for(a=0;3>a;a++)s=parseInt(t.substr(2*a,2),16),s=Math.round(Math.min(Math.max(0,s+s*e),255)).toString(16),i+=("00"+s).substr(s.length);return i};AmCharts.Bezier=AmCharts.Class({construct:function(t,e,i,s,a,r,h,o,n,l){"object"==typeof h&&(h=h[0]);"object"==typeof o&&(o=o[0]);r={fill:h,"fill-opacity":o,"stroke-width":r};void 0!==n&&0<n&&(r["stroke-dasharray"]=n);isNaN(a)||(r["stroke-opacity"]=a);s&&(r.stroke=s);s="M"+Math.round(e[0])+","+Math.round(i[0]);a=[];for(n=0;n<e.length;n++)a.push({x:Number(e[n]),y:Number(i[n])});1<a.length&&(e=this.interpolate(a),s+=this.drawBeziers(e));l?s+=l:AmCharts.VML||(s+="M0,0 L0,0");this.path=t.path(s).attr(r)},interpolate:function(t){var e=[];e.push({x:t[0].x,y:t[0].y});var i=t[1].x-t[0].x,s=t[1].y-t[0].y,a=AmCharts.bezierX,r=AmCharts.bezierY;e.push({x:t[0].x+i/a,y:t[0].y+s/r});var h;for(h=1;h<t.length-1;h++){var o=t[h-1],n=t[h],s=t[h+1];isNaN(s.x)&&(s=n);isNaN(n.x)&&(n=o);isNaN(o.x)&&(o=n);i=s.x-n.x;s=s.y-o.y;o=n.x-o.x;o>i&&(o=i);e.push({x:n.x-o/a,y:n.y-s/r});e.push({x:n.x,y:n.y});e.push({x:n.x+o/a,y:n.y+s/r})}s=t[t.length-1].y-t[t.length-2].y;i=t[t.length-1].x-t[t.length-2].x;e.push({x:t[t.length-1].x-i/a,y:t[t.length-1].y-s/r});e.push({x:t[t.length-1].x,y:t[t.length-1].y});return e},drawBeziers:function(t){var e="",i;for(i=0;i<(t.length-1)/3;i++)e+=this.drawBezierMidpoint(t[3*i],t[3*i+1],t[3*i+2],t[3*i+3]);return e},drawBezierMidpoint:function(t,e,i,s){var a=Math.round,r=this.getPointOnSegment(t,e,.75),h=this.getPointOnSegment(s,i,.75),o=(s.x-t.x)/16,n=(s.y-t.y)/16,l=this.getPointOnSegment(t,e,.375);t=this.getPointOnSegment(r,h,.375);t.x-=o;t.y-=n;e=this.getPointOnSegment(h,r,.375);e.x+=o;e.y+=n;i=this.getPointOnSegment(s,i,.375);o=this.getMiddle(l,t);r=this.getMiddle(r,h);h=this.getMiddle(e,i);l=" Q"+a(l.x)+","+a(l.y)+","+a(o.x)+","+a(o.y);l+=" Q"+a(t.x)+","+a(t.y)+","+a(r.x)+","+a(r.y);l+=" Q"+a(e.x)+","+a(e.y)+","+a(h.x)+","+a(h.y);return l+=" Q"+a(i.x)+","+a(i.y)+","+a(s.x)+","+a(s.y)},getMiddle:function(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}},getPointOnSegment:function(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}});AmCharts.AmDraw=AmCharts.Class({construct:function(t,e,i,s){AmCharts.SVG_NS="http://www.w3.org/2000/svg";AmCharts.SVG_XLINK="http://www.w3.org/1999/xlink";AmCharts.hasSVG=!!document.createElementNS&&!!document.createElementNS(AmCharts.SVG_NS,"svg").createSVGRect;1>e&&(e=10);1>i&&(i=10);this.div=t;this.width=e;this.height=i;this.rBin=document.createElement("div");AmCharts.hasSVG?(AmCharts.SVG=!0,s=this.createSvgElement("svg"),s.style.position="absolute",s.style.width=e+"px",s.style.height=i+"px",AmCharts.rtl&&(s.setAttribute("direction","rtl"),s.style.left="auto",s.style.right="0px"),s.setAttribute("version","1.1"),t.appendChild(s),this.container=s,this.R=new AmCharts.SVGRenderer(this)):AmCharts.isIE&&AmCharts.VMLRenderer&&(AmCharts.VML=!0,AmCharts.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),e=document.createStyleSheet(),e.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),AmCharts.vmlStyleSheet=e),this.container=t,this.R=new AmCharts.VMLRenderer(this,s),this.R.disableSelection(t))},createSvgElement:function(t){return document.createElementNS(AmCharts.SVG_NS,t)},circle:function(t,e,i,s){var a=new AmCharts.AmDObject("circle",this);a.attr({r:i,cx:t,cy:e});this.addToContainer(a.node,s);return a},setSize:function(t,e){0<t&&0<e&&(this.container.style.width=t+"px",this.container.style.height=e+"px")},rect:function(t,e,i,s,a,r,h){var o=new AmCharts.AmDObject("rect",this);AmCharts.VML&&(a=100*a/Math.min(i,s),i+=2*r,s+=2*r,o.bw=r,o.node.style.marginLeft=-r,o.node.style.marginTop=-r);1>i&&(i=1);1>s&&(s=1);o.attr({x:t,y:e,width:i,height:s,rx:a,ry:a,"stroke-width":r});this.addToContainer(o.node,h);return o},image:function(t,e,i,s,a,r){var h=new AmCharts.AmDObject("image",this);h.attr({x:e,y:i,width:s,height:a});this.R.path(h,t);this.addToContainer(h.node,r);return h},addToContainer:function(t,e){e||(e=this.container);e.appendChild(t)},text:function(t,e,i){return this.R.text(t,e,i)},path:function(t,e,i,s){var a=new AmCharts.AmDObject("path",this);s||(s="100,100");a.attr({cs:s});i?a.attr({dd:t}):a.attr({d:t});this.addToContainer(a.node,e);return a},set:function(t){return this.R.set(t)},remove:function(t){if(t){var e=this.rBin;e.appendChild(t);e.innerHTML=""}},renderFix:function(){var t=this.container,e=t.style,i;try{i=t.getScreenCTM()||t.createSVGMatrix()}catch(s){i=t.createSVGMatrix()}t=1-i.e%1;i=1-i.f%1;.5<t&&(t-=1);.5<i&&(i-=1);t&&(e.left=t+"px");i&&(e.top=i+"px")},update:function(){this.R.update()}});AmCharts.AmDObject=AmCharts.Class({construct:function(t,e){this.D=e;this.R=e.R;this.node=this.R.create(this,t);this.y=this.x=0;this.scale=1},attr:function(t){this.R.attr(this,t);return this},getAttr:function(t){return this.node.getAttribute(t)},setAttr:function(t,e){this.R.setAttr(this,t,e);return this},clipRect:function(t,e,i,s){this.R.clipRect(this,t,e,i,s)},translate:function(t,e,i,s){s||(t=Math.round(t),e=Math.round(e));this.R.move(this,t,e,i);this.x=t;this.y=e;this.scale=i;this.angle&&this.rotate(this.angle)},rotate:function(t,e){this.R.rotate(this,t,e);this.angle=t},animate:function(t,e,i){for(var s in t)if(t.hasOwnProperty(s)){var a=s,r=t[s];i=AmCharts.getEffect(i);this.R.animate(this,a,r,e,i)}},push:function(t){if(t){var e=this.node;e.appendChild(t.node);var i=t.clipPath;i&&e.appendChild(i);(t=t.grad)&&e.appendChild(t)}},text:function(t){this.R.setText(this,t)},remove:function(){this.R.remove(this)},clear:function(){var t=this.node;if(t.hasChildNodes())for(;1<=t.childNodes.length;)t.removeChild(t.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;e&&e.appendChild(t)}},toPrevious:function(){var t=this.node;t&&this.prevNextNode&&(t=t.parentNode)&&t.insertBefore(this.prevNextNode,null)},toBack:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;if(e){var i=e.firstChild;i&&e.insertBefore(t,i)}}},mouseover:function(t){this.R.addListener(this,"mouseover",t);return this},mouseout:function(t){this.R.addListener(this,"mouseout",t);return this},click:function(t){this.R.addListener(this,"click",t);return this},dblclick:function(t){this.R.addListener(this,"dblclick",t);return this},mousedown:function(t){this.R.addListener(this,"mousedown",t);return this},mouseup:function(t){this.R.addListener(this,"mouseup",t);return this},touchstart:function(t){this.R.addListener(this,"touchstart",t);return this},touchend:function(t){this.R.addListener(this,"touchend",t);return this},contextmenu:function(t){this.node.addEventListener?this.node.addEventListener("contextmenu",t,!0):this.R.addListener(this,"contextmenu",t);return this},stop:function(t){(t=this.animationX)&&AmCharts.removeFromArray(this.R.animations,t);(t=this.animationY)&&AmCharts.removeFromArray(this.R.animations,t)},length:function(){return this.node.childNodes.length},gradient:function(t,e,i){this.R.gradient(this,t,e,i)},pattern:function(t,e){t&&this.R.pattern(this,t,e)}});AmCharts.VMLRenderer=AmCharts.Class({construct:function(t,e){this.chart=e;this.D=t;this.cNames={circle:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(t,e){var i;if("group"==e)i=document.createElement("div"),t.type="div";else if("text"==e)i=document.createElement("div"),t.type="text";else if("image"==e)i=document.createElement("img"),t.type="image";else{t.type="shape";t.shapeType=this.cNames[e];i=document.createElement("amvml:"+this.cNames[e]);var s=document.createElement("amvml:stroke");i.appendChild(s);t.stroke=s;var a=document.createElement("amvml:fill");i.appendChild(a);t.fill=a;a.className="amvml";s.className="amvml";i.className="amvml"}i.style.position="absolute";i.style.top=0;i.style.left=0;return i},path:function(t,e){t.node.setAttribute("src",e)},setAttr:function(t,e,i){if(void 0!==i){var s;8===document.documentMode&&(s=!0);var a=t.node,r=t.type,h=a.style;"r"==e&&(h.width=2*i,h.height=2*i);"roundrect"!=t.shapeType||"width"!=e&&"height"!=e||(i-=1);"cursor"==e&&(h.cursor=i);"cx"==e&&(h.left=i-AmCharts.removePx(h.width)/2);"cy"==e&&(h.top=i-AmCharts.removePx(h.height)/2);var o=this.styleMap[e];void 0!==o&&(h[o]=i);"text"==r&&("text-anchor"==e&&(t.anchor=i,o=a.clientWidth,"end"==i&&(h.marginLeft=-o+"px"),"middle"==i&&(h.marginLeft=-(o/2)+"px",h.textAlign="center"),"start"==i&&(h.marginLeft="0px")),"fill"==e&&(h.color=i),"font-weight"==e&&(h.fontWeight=i));if(h=t.children)for(o=0;o<h.length;o++)h[o].setAttr(e,i);if("shape"==r){"cs"==e&&(a.style.width="100px",a.style.height="100px",a.setAttribute("coordsize",i));"d"==e&&a.setAttribute("path",this.svgPathToVml(i));"dd"==e&&a.setAttribute("path",i);r=t.stroke;t=t.fill;"stroke"==e&&(s?r.color=i:r.setAttribute("color",i));"stroke-width"==e&&(s?r.weight=i:r.setAttribute("weight",i));"stroke-opacity"==e&&(s?r.opacity=i:r.setAttribute("opacity",i));"stroke-dasharray"==e&&(h="solid",0<i&&3>i&&(h="dot"),3<=i&&6>=i&&(h="dash"),6<i&&(h="longdash"),s?r.dashstyle=h:r.setAttribute("dashstyle",h));if("fill-opacity"==e||"opacity"==e)0===i?s?t.on=!1:t.setAttribute("on",!1):s?t.opacity=i:t.setAttribute("opacity",i);"fill"==e&&(s?t.color=i:t.setAttribute("color",i));"rx"==e&&(s?a.arcSize=i+"%":a.setAttribute("arcsize",i+"%"))}}},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},text:function(t,e,i){var s=new AmCharts.AmDObject("text",this.D),a=s.node;a.style.whiteSpace="pre";a.innerHTML=t;this.D.addToContainer(a,i);this.attr(s,e);return s},getBBox:function(t){return this.getBox(t.node)},getBox:function(t){var e=t.offsetLeft,i=t.offsetTop,s=t.offsetWidth,a=t.offsetHeight,r;if(t.hasChildNodes()){var h,o,n;for(n=0;n<t.childNodes.length;n++){r=this.getBox(t.childNodes[n]);var l=r.x;isNaN(l)||(isNaN(h)?h=l:l<h&&(h=l));var d=r.y;isNaN(d)||(isNaN(o)?o=d:d<o&&(o=d));l=r.width+l;isNaN(l)||(s=Math.max(s,l));r=r.height+d;isNaN(r)||(a=Math.max(a,r))}0>h&&(e+=h);0>o&&(i+=o)}return{x:e,y:i,width:s,height:a}},setText:function(t,e){var i=t.node;i&&(i.innerHTML=e);this.setAttr(t,"text-anchor",t.anchor)},addListener:function(t,e,i){t.node["on"+e]=i},move:function(t,e,i){var s=t.node,a=s.style;"text"==t.type&&(i-=AmCharts.removePx(a.fontSize)/2-1);"oval"==t.shapeType&&(e-=AmCharts.removePx(a.width)/2,i-=AmCharts.removePx(a.height)/2);t=t.bw;isNaN(t)||(e-=t,i-=t);isNaN(e)||isNaN(i)||(s.style.left=e+"px",s.style.top=i+"px")},svgPathToVml:function(t){var e=t.split(" ");t="";var i,s=Math.round,a;for(a=0;a<e.length;a++){var r=e[a],h=r.substring(0,1),r=r.substring(1),o=r.split(","),n=s(o[0])+","+s(o[1]);"M"==h&&(t+=" m "+n);"L"==h&&(t+=" l "+n);"Z"==h&&(t+=" x e");if("Q"==h){var l=i.length,d=i[l-1],u=o[0],c=o[1],n=o[2],m=o[3];i=s(i[l-2]/3+2/3*u);d=s(d/3+2/3*c);u=s(2/3*u+n/3);c=s(2/3*c+m/3);t+=" c "+i+","+d+","+u+","+c+","+n+","+m}"A"==h&&(t+=" wa "+r);"B"==h&&(t+=" at "+r);i=o}return t},animate:function(t,e,i,s,a){var r=t.node,h=this.chart;if("translate"==e){e=i.split(",");i=e[1];var o=r.offsetTop;h.animate(t,"left",r.offsetLeft,e[0],s,a,"px");h.animate(t,"top",o,i,s,a,"px")}},clipRect:function(t,e,i,s,a){t=t.node;0===e&&0===i?(t.style.width=s+"px",t.style.height=a+"px",t.style.overflow="hidden"):t.style.clip="rect("+i+"px "+(e+s)+"px "+(i+a)+"px "+e+"px)"},rotate:function(t,e,i){if(0!==Number(e)){var s=t.node;t=s.style;i||(i=this.getBGColor(s.parentNode));t.backgroundColor=i;t.paddingLeft=1;i=e*Math.PI/180;var a=Math.cos(i),r=Math.sin(i),h=AmCharts.removePx(t.left),o=AmCharts.removePx(t.top),n=s.offsetWidth,s=s.offsetHeight;e/=Math.abs(e);t.left=h+n/2-n/2*Math.cos(i)-e*s/2*Math.sin(i)+3;t.top=o-e*n/2*Math.sin(i)+e*s/2*Math.sin(i);t.cssText=t.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+a+"', M12='"+-r+"', M21='"+r+"', M22='"+a+"', sizingmethod='auto expand');"}},getBGColor:function(t){var e="#FFFFFF";if(t.style){var i=t.style.backgroundColor;""!==i?e=i:t.parentNode&&(e=this.getBGColor(t.parentNode))}return e},set:function(t){var e=new AmCharts.AmDObject("group",this.D);this.D.container.appendChild(e.node);if(t){var i;for(i=0;i<t.length;i++)e.push(t[i])}return e},gradient:function(t,e,i,s){var a="";"radialGradient"==e&&(e="gradientradial",i.reverse());"linearGradient"==e&&(e="gradient");var r;for(r=0;r<i.length;r++){var h=Math.round(100*r/(i.length-1)),a=a+(h+"% "+i[r]);r<i.length-1&&(a+=",")}t=t.fill;90==s?s=0:270==s?s=180:180==s?s=90:0===s&&(s=270);8===document.documentMode?(t.type=e,t.angle=s):(t.setAttribute("type",e),t.setAttribute("angle",s));a&&(t.colors.value=a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);this.D.remove(t.node)},disableSelection:function(t){void 0!==typeof t.onselectstart&&(t.onselectstart=function(){return!1});t.style.cursor="default"},pattern:function(t,e){var i=t.fill;t.node.fillColor="none";8===document.documentMode?(i.type="tile",i.src=e.url):(i.setAttribute("type","tile"),i.setAttribute("src",e.url))},update:function(){}});AmCharts.SVGRenderer=AmCharts.Class({construct:function(t){this.D=t;this.animations=[]},create:function(t,e){return document.createElementNS(AmCharts.SVG_NS,e)},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},setAttr:function(t,e,i){void 0!==i&&t.node.setAttribute(e,i)},animate:function(t,e,i,s,a){var r=t.node;t["an_"+e]&&AmCharts.removeFromArray(this.animations,t["an_"+e]);"translate"==e?(r=(r=r.getAttribute("transform"))?String(r).substring(10,r.length-1):"0,0",r=r.split(", ").join(" "),r=r.split(" ").join(","),0===r&&(r="0,0")):r=Number(r.getAttribute(e));i={obj:t,frame:0,attribute:e,from:r,to:i,time:s,effect:a};this.animations.push(i);t["an_"+e]=i},update:function(){var t,e=this.animations;for(t=e.length-1;0<=t;t--){var i=e[t],s=1e3*i.time/AmCharts.updateRate,a=i.frame+1,r=i.obj,h=i.attribute,o,n,l;a<=s?(i.frame++,"translate"==h?(o=i.from.split(","),h=Number(o[0]),o=Number(o[1]),isNaN(o)&&(o=0),n=i.to.split(","),l=Number(n[0]),n=Number(n[1]),l=0===l-h?l:Math.round(AmCharts[i.effect](0,a,h,l-h,s)),i=0===n-o?n:Math.round(AmCharts[i.effect](0,a,o,n-o,s)),h="transform",i="translate("+l+","+i+")"):(n=Number(i.from),o=Number(i.to),l=o-n,i=AmCharts[i.effect](0,a,n,l,s),isNaN(i)&&(i=o),0===l&&this.animations.splice(t,1)),this.setAttr(r,h,i)):("translate"==h?(n=i.to.split(","),l=Number(n[0]),n=Number(n[1]),r.translate(l,n)):(o=Number(i.to),this.setAttr(r,h,o)),this.animations.splice(t,1))}},getBBox:function(t){if(t=t.node)try{return t.getBBox()}catch(e){}return{width:0,height:0,x:0,y:0}},path:function(t,e){t.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",e)},clipRect:function(t,e,i,s,a){var r=t.node,h=t.clipPath;h&&this.D.remove(h);var o=r.parentNode;o&&(r=document.createElementNS(AmCharts.SVG_NS,"clipPath"),h=AmCharts.getUniqueId(),r.setAttribute("id",h),this.D.rect(e,i,s,a,0,0,r),o.appendChild(r),e="#",AmCharts.baseHref&&!AmCharts.isIE&&(e=window.location.href+e),this.setAttr(t,"clip-path","url("+e+h+")"),this.clipPathC++,t.clipPath=r)},text:function(t,e,i){var s=new AmCharts.AmDObject("text",this.D);t=String(t).split("\n");var a=e["font-size"],r;for(r=0;r<t.length;r++){var h=this.create(null,"tspan");h.appendChild(document.createTextNode(t[r]));h.setAttribute("y",(a+2)*r+Math.round(a/2));h.setAttribute("x",0);s.node.appendChild(h)}s.node.setAttribute("y",Math.round(a/2));this.attr(s,e);this.D.addToContainer(s.node,i);return s},setText:function(t,e){var i=t.node;i&&(i.removeChild(i.firstChild),i.appendChild(document.createTextNode(e)))},move:function(t,e,i,s){e="translate("+e+","+i+")";s&&(e=e+" scale("+s+")");this.setAttr(t,"transform",e)},rotate:function(t,e){var i=t.node.getAttribute("transform"),s="rotate("+e+")";i&&(s=i+" "+s);this.setAttr(t,"transform",s)},set:function(t){var e=new AmCharts.AmDObject("g",this.D);this.D.container.appendChild(e.node);if(t){var i;for(i=0;i<t.length;i++)e.push(t[i])}return e},addListener:function(t,e,i){t.node["on"+e]=i},gradient:function(t,e,i,s){var a=t.node,r=t.grad;r&&this.D.remove(r);e=document.createElementNS(AmCharts.SVG_NS,e);r=AmCharts.getUniqueId();

e.setAttribute("id",r);if(!isNaN(s)){var h=0,o=0,n=0,l=0;90==s?n=100:270==s?l=100:180==s?h=100:0===s&&(o=100);e.setAttribute("x1",h+"%");e.setAttribute("x2",o+"%");e.setAttribute("y1",n+"%");e.setAttribute("y2",l+"%")}for(s=0;s<i.length;s++)h=document.createElementNS(AmCharts.SVG_NS,"stop"),o=100*s/(i.length-1),0===s&&(o=0),h.setAttribute("offset",o+"%"),h.setAttribute("stop-color",i[s]),e.appendChild(h);a.parentNode.appendChild(e);i="#";AmCharts.baseHref&&!AmCharts.isIE&&(i=window.location.href+i);a.setAttribute("fill","url("+i+r+")");t.grad=e},pattern:function(t,e,i){var s=t.node;isNaN(i)&&(i=1);var a=t.patternNode;a&&this.D.remove(a);var a=document.createElementNS(AmCharts.SVG_NS,"pattern"),r=AmCharts.getUniqueId(),h=e;e.url&&(h=e.url);var o=Number(e.width);isNaN(o)&&(o=4);var n=Number(e.height);isNaN(n)&&(n=4);o/=i;n/=i;i=e.x;isNaN(i)&&(i=0);var l=-Math.random()*Number(e.randomX);isNaN(l)||(i=l);l=e.y;isNaN(l)&&(l=0);e=-Math.random()*Number(e.randomY);isNaN(e)||(l=e);a.setAttribute("id",r);a.setAttribute("width",o);a.setAttribute("height",n);a.setAttribute("patternUnits","userSpaceOnUse");a.setAttribute("xlink:href",h);this.D.image(h,0,0,o,n,a).translate(i,l);h="#";AmCharts.baseHref&&!AmCharts.isIE&&(h=window.location.href+h);s.setAttribute("fill","url("+h+r+")");t.patternNode=a;s.parentNode.appendChild(a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);t.grad&&this.D.remove(t.grad);t.patternNode&&this.D.remove(t.patternNode);this.D.remove(t.node)}});AmCharts.AmDSet=AmCharts.Class({construct:function(t){this.create("g")},attr:function(t){this.R.attr(this.node,t)},move:function(t,e){this.R.move(this.node,t,e)}});AmCharts.AmLegend=AmCharts.Class({construct:function(t){this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.dateFormat="DD-MM-YYYY";this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;AmCharts.applyTheme(this,t,"AmLegend")},setData:function(t){this.legendData=t;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];(AmCharts.ifArray(this.legendData)||AmCharts.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var t=this.chart,e=this.position,i=this.width,s=t.divRealWidth,a=t.divRealHeight,r=this.div,h=this.legendData;this.data&&(h=this.data);isNaN(this.fontSize)&&(this.fontSize=t.fontSize);if("right"==e||"left"==e)this.maxColumns=1,this.marginLeft=this.marginRight=10;else if(this.autoMargins){this.marginRight=t.marginRight;this.marginLeft=t.marginLeft;var o=t.autoMarginOffset;"bottom"==e?(this.marginBottom=o,this.marginTop=0):(this.marginTop=o,this.marginBottom=0)}i=void 0!==i?AmCharts.toCoordinate(i,s):t.realWidth;"outside"==e?(i=r.offsetWidth,a=r.offsetHeight,r.clientHeight&&(i=r.clientWidth,a=r.clientHeight)):(r.style.width=i+"px",r.className="amChartsLegend");this.divWidth=i;this.container=new AmCharts.AmDraw(r,i,a,t);this.lx=0;this.ly=8;e=this.markerSize;e>this.fontSize&&(this.ly=e/2-1);0<e&&(this.lx+=e+this.markerLabelGap);this.titleWidth=0;if(e=this.title)t=AmCharts.text(this.container,e,this.color,t.fontFamily,this.fontSize,"start",!0),t.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),t=t.getBBox(),this.titleWidth=t.width+15,this.titleHeight=t.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(t=0;t<h.length;t++)this.createEntry(h[t]);for(t=this.index=0;t<h.length;t++)this.createValue(h[t])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var t=this.position,e=this.marginLeft+this.titleWidth,i=this.marginRight,s=this.marginTop,a=this.marginBottom,r=this.horizontalGap,h=this.div,o=this.divWidth,n=this.maxColumns,l=this.verticalGap,d=this.spacing,u=o-i-e,c=0,m=0,p=this.container,f=p.set();this.set=f;p=p.set();f.push(p);var g=this.entries,v,C;for(C=0;C<g.length;C++){v=g[C].getBBox();var A=v.width;A>c&&(c=A);v=v.height;v>m&&(m=v)}var b=A=0,x=r;for(C=0;C<g.length;C++){var y=g[C];this.reversedOrder&&(y=g[g.length-C-1]);v=y.getBBox();var w;this.equalWidths?w=r+b*(c+d+this.markerLabelGap):(w=x,x=x+v.width+r+d);w+v.width>u&&0<C&&0!==b&&(A++,b=0,w=r,x=w+v.width+r+d);y.translate(w,(m+l)*A);b++;!isNaN(n)&&b>=n&&(b=0,A++);p.push(y)}v=p.getBBox();n=v.height+2*l-1;"left"==t||"right"==t?(o=v.width+2*r,h.style.width=o+e+i+"px"):o=o-e-i-1;i=AmCharts.polygon(this.container,[0,o,o,0],[0,0,n,n],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);f.push(i);f.translate(e,s);i.toBack();e=r;if("top"==t||"bottom"==t||"absolute"==t||"outside"==t)"center"==this.align?e=r+(o-v.width)/2:"right"==this.align&&(e=r+o-v.width);p.translate(e,l+1);this.titleHeight>n&&(n=this.titleHeight);t=n+s+a+1;0>t&&(t=0);h.style.height=Math.round(t)+"px"},createEntry:function(t){if(!1!==t.visibleInLegend){var e=this.chart,i=t.markerType;i||(i=this.markerType);var s=t.color,a=t.alpha;t.legendKeyColor&&(s=t.legendKeyColor());t.legendKeyAlpha&&(a=t.legendKeyAlpha());var r;!0===t.hidden&&(r=s=this.markerDisabledColor);var h=t.pattern,o=t.customMarker;o||(o=this.customMarker);var n=this.container,l=this.markerSize,d=0,u=0,c=l/2;if(this.useGraphSettings)if(d=t.type,"line"==d||"step"==d||"smoothedLine"==d||"ohlc"==d)this.switchType=void 0,h=n.set(),t.hidden||(s=t.lineColor,r=t.bulletBorderColor),u=AmCharts.line(n,[0,2*l],[l/2,l/2],s,t.lineAlpha,t.lineThickness,t.dashLength),h.push(u),t.bullet&&(t.hidden||(s=t.bulletColor),u=AmCharts.bullet(n,t.bullet,t.bulletSize,s,t.bulletAlpha,t.bulletBorderThickness,r,t.bulletBorderAlpha))&&(u.translate(l+1,l/2),h.push(u)),c=0,d=l,u=l/3;else{var m;t.getGradRotation&&(m=t.getGradRotation());if(h=this.createMarker("rectangle",t.fillColors,t.fillAlphas,t.lineThickness,s,t.lineAlpha,m,h))c=l,h.translate(c,l/2);d=l}else o?(e.path&&(o=e.path+o),h=n.image(o,0,0,l,l)):(h=this.createMarker(i,s,a,void 0,void 0,void 0,void 0,h))&&h.translate(l/2,l/2);this.addListeners(h,t);n=n.set([h]);this.switchable&&n.setAttr("cursor","pointer");if(r=this.switchType)m="x"==r?this.createX():this.createV(),m.dItem=t,!0!==t.hidden?"x"==r?m.hide():m.show():"x"!=r&&m.hide(),this.switchable||m.hide(),this.addListeners(m,t),t.legendSwitch=m,n.push(m);r=this.color;t.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(r=this.selectedColor);this.useMarkerColorForLabels&&(r=s);!0===t.hidden&&(r=this.markerDisabledColor);s=AmCharts.massReplace(this.labelText,{"[[title]]":t.title});m=this.fontSize;h&&l<=m&&h.translate(c,l/2+this.ly-m/2+(m+2-l)/2-u);var p;s&&(s=AmCharts.fixBrakes(s),t.legendTextReal=s,p=AmCharts.text(this.container,s,r,e.fontFamily,m,"start"),p.translate(this.lx+d,this.ly),n.push(p),e=p.getBBox().width,this.maxLabelWidth<e&&(this.maxLabelWidth=e));this.entries[this.index]=n;t.legendEntry=this.entries[this.index];t.legendLabel=p;this.index++}},addListeners:function(t,e){var i=this;t&&t.mouseover(function(){i.rollOverMarker(e)}).mouseout(function(){i.rollOutMarker(e)}).click(function(){i.clickMarker(e)})},rollOverMarker:function(t){this.switchable&&this.dispatch("rollOverMarker",t);this.dispatch("rollOverItem",t)},rollOutMarker:function(t){this.switchable&&this.dispatch("rollOutMarker",t);this.dispatch("rollOutItem",t)},clickMarker:function(t){this.switchable?!0===t.hidden?this.dispatch("showItem",t):this.dispatch("hideItem",t):this.textClickEnabled&&this.dispatch("clickMarker",t)},rollOverLabel:function(t){t.hidden||(this.textClickEnabled&&t.legendLabel&&t.legendLabel.attr({fill:this.rollOverColor}),this.dispatch("rollOverItem",t))},rollOutLabel:function(t){if(!t.hidden){if(this.textClickEnabled&&t.legendLabel){var e=this.color;void 0!==this.selectedColor&&t.showBalloon&&(e=this.selectedColor);this.useMarkerColorForLabels&&(e=t.lineColor,void 0===e&&(e=t.color));t.legendLabel.attr({fill:e})}this.dispatch("rollOutItem",t)}},clickLabel:function(t){this.textClickEnabled?t.hidden||this.dispatch("clickLabel",t):this.switchable&&(!0===t.hidden?this.dispatch("showItem",t):this.dispatch("hideItem",t))},dispatch:function(t,e){this.fire(t,{type:t,dataItem:e,target:this,chart:this.chart})},createValue:function(t){var e=this,i=e.fontSize;if(!1!==t.visibleInLegend){var s=e.maxLabelWidth;e.equalWidths||(e.valueAlign="left");"left"==e.valueAlign&&(s=t.legendEntry.getBBox().width);var a=s;if(e.valueText){var r=e.color;e.useMarkerColorForValues&&(r=t.color,t.legendKeyColor&&(r=t.legendKeyColor()));!0===t.hidden&&(r=e.markerDisabledColor);var h=e.valueText,s=s+e.lx+e.markerLabelGap+e.valueWidth,o="end";"left"==e.valueAlign&&(s-=e.valueWidth,o="start");r=AmCharts.text(e.container,h,r,e.chart.fontFamily,i,o);r.translate(s,e.ly);e.entries[e.index].push(r);a+=e.valueWidth+2*e.markerLabelGap;r.dItem=t;e.valueLabels.push(r)}e.index++;r=e.markerSize;r<i+7&&(r=i+7,AmCharts.VML&&(r+=3));i=e.container.rect(e.markerSize,0,a,r,0,0).attr({stroke:"none",fill:"#ffffff","fill-opacity":.005});i.dItem=t;e.entries[e.index-1].push(i);i.mouseover(function(){e.rollOverLabel(t)}).mouseout(function(){e.rollOutLabel(t)}).click(function(){e.clickLabel(t)})}},createV:function(){var t=this.markerSize;return AmCharts.polygon(this.container,[t/5,t/2,t-t/5,t/2],[t/3,t-t/5,t/5,t/1.7],this.switchColor)},createX:function(){var t=this.markerSize-4,e={stroke:this.switchColor,"stroke-width":3},i=this.container,s=AmCharts.line(i,[3,t],[3,t]).attr(e),t=AmCharts.line(i,[3,t],[t,3]).attr(e);return this.container.set([s,t])},createMarker:function(t,e,i,s,a,r,h,o){var n=this.markerSize,l=this.container;a||(a=this.markerBorderColor);a||(a=e);isNaN(s)&&(s=this.markerBorderThickness);isNaN(r)&&(r=this.markerBorderAlpha);return AmCharts.bullet(l,t,n,e,i,s,a,r,n,h,o)},validateNow:function(){this.invalidateSize()},updateValues:function(){var t=this.valueLabels,e=this.chart,i,s=this.data;for(i=0;i<t.length;i++){var a=t[i],r=a.dItem,h=" ";if(s)r.value?a.text(r.value):a.text("");else{if(void 0!==r.type){var o=r.currentDataItem,n=this.periodValueText;r.legendPeriodValueText&&(n=r.legendPeriodValueText);o?(h=this.valueText,r.legendValueText&&(h=r.legendValueText),h=e.formatString(h,o)):n&&(h=e.formatPeriodString(n,r))}else h=e.formatString(this.valueText,r);(o=r.legendLabel)&&o.text(r.legendTextReal);a.text(h)}}},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},destroy:function(){this.div.innerHTML="";AmCharts.remove(this.set)}});AmCharts.formatMilliseconds=function(t,e){if(-1!=t.indexOf("fff")){var i=e.getMilliseconds(),s=String(i);10>i&&(s="00"+i);10<=i&&100>i&&(s="0"+i);t=t.replace(/fff/g,s)}return t};AmCharts.extractPeriod=function(t){var e=AmCharts.stripNumbers(t),i=1;e!=t&&(i=Number(t.slice(0,t.indexOf(e))));return{period:e,count:i}};AmCharts.resetDateToMin=function(t,e,i,s){void 0===s&&(s=1);var a,r,h,o,n,l,d;AmCharts.useUTC?(a=t.getUTCFullYear(),r=t.getUTCMonth(),h=t.getUTCDate(),o=t.getUTCHours(),n=t.getUTCMinutes(),l=t.getUTCSeconds(),d=t.getUTCMilliseconds(),t=t.getUTCDay()):(a=t.getFullYear(),r=t.getMonth(),h=t.getDate(),o=t.getHours(),n=t.getMinutes(),l=t.getSeconds(),d=t.getMilliseconds(),t=t.getDay());switch(e){case"YYYY":a=Math.floor(a/i)*i;r=0;h=1;d=l=n=o=0;break;case"MM":r=Math.floor(r/i)*i;h=1;d=l=n=o=0;break;case"WW":0===t&&0<s&&(t=7);h=h-t+s;d=l=n=o=0;break;case"DD":d=l=n=o=0;break;case"hh":o=Math.floor(o/i)*i;d=l=n=0;break;case"mm":n=Math.floor(n/i)*i;d=l=0;break;case"ss":l=Math.floor(l/i)*i;d=0;break;case"fff":d=Math.floor(d/i)*i}AmCharts.useUTC?(t=new Date,t.setUTCFullYear(a,r,h),t.setUTCHours(o,n,l,d)):t=new Date(a,r,h,o,n,l,d);return t};AmCharts.getPeriodDuration=function(t,e){void 0===e&&(e=1);var i;switch(t){case"YYYY":i=316224e5;break;case"MM":i=26784e5;break;case"WW":i=6048e5;break;case"DD":i=864e5;break;case"hh":i=36e5;break;case"mm":i=6e4;break;case"ss":i=1e3;break;case"fff":i=1}return i*e};AmCharts.intervals={s:{nextInterval:"ss",contains:1e3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};AmCharts.getMaxInterval=function(t,e){var i=AmCharts.intervals;return t>=i[e].contains?(t=Math.round(t/i[e].contains),e=i[e].nextInterval,AmCharts.getMaxInterval(t,e)):"ss"==e?i[e].nextInterval:e};AmCharts.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");AmCharts.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");AmCharts.monthNames="January February March April May June July August September October November December".split(" ");AmCharts.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");AmCharts.getWeekNumber=function(t){t=new Date(t);t.setHours(0,0,0);t.setDate(t.getDate()+4-(t.getDay()||7));var e=new Date(t.getFullYear(),0,1);return Math.ceil(((t-e)/864e5+1)/7)};AmCharts.stringToDate=function(t,e){var i={},s=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],a=!0,r=e.indexOf("AA");-1!=r&&(t.substr(r,2),"pm"==t.toLowerCase&&(a=!1));var r=e,h,o,n;for(n=0;n<s.length;n++)o=s[n].period,i[o]=0,"date"==o&&(i[o]=1);for(n=0;n<s.length;n++)if(h=s[n].pattern,o=s[n].period,-1!=e.indexOf(h)){var l=AmCharts.getFromDateString(h,t,r);e=e.replace(h,"");if("KK"==h||"K"==h||"LL"==h||"L"==h)a||(l+=12);i[o]=l}return new Date(i.year,i.month,i.date,i.hours,i.minutes,i.seconds,i.milliseconds)};AmCharts.getFromDateString=function(t,e,i){i=i.indexOf(t);e=e.substr(i,t.length);"0"==e.charAt(0)&&(e=e.substr(1,e.length-1));e=Number(e);isNaN(e)&&(e=0);-1!=t.indexOf("M")&&e--;return e};AmCharts.formatDate=function(t,e){var i,s,a,r,h,o,n,l,d=AmCharts.getWeekNumber(t);AmCharts.useUTC?(i=t.getUTCFullYear(),s=t.getUTCMonth(),a=t.getUTCDate(),r=t.getUTCDay(),h=t.getUTCHours(),o=t.getUTCMinutes(),n=t.getUTCSeconds(),l=t.getUTCMilliseconds()):(i=t.getFullYear(),s=t.getMonth(),a=t.getDate(),r=t.getDay(),h=t.getHours(),o=t.getMinutes(),n=t.getSeconds(),l=t.getMilliseconds());var u=String(i).substr(2,2),c=s+1;9>s&&(c="0"+c);var m=a;10>a&&(m="0"+a);var p="0"+r;e=e.replace(/W/g,d);d=h;24==d&&(d=0);var f=d;10>f&&(f="0"+f);e=e.replace(/JJ/g,f);e=e.replace(/J/g,d);d=h;0===d&&(d=24);f=d;10>f&&(f="0"+f);e=e.replace(/HH/g,f);e=e.replace(/H/g,d);d=h;11<d&&(d-=12);f=d;10>f&&(f="0"+f);e=e.replace(/KK/g,f);e=e.replace(/K/g,d);d=h;0===d&&(d=12);12<d&&(d-=12);f=d;10>f&&(f="0"+f);e=e.replace(/LL/g,f);e=e.replace(/L/g,d);d=o;10>d&&(d="0"+d);e=e.replace(/NN/g,d);e=e.replace(/N/g,o);o=n;10>o&&(o="0"+o);e=e.replace(/SS/g,o);e=e.replace(/S/g,n);n=l;10>n&&(n="00"+n);100>n&&(n="0"+n);o=l;10>o&&(o="00"+o);e=e.replace(/QQQ/g,n);e=e.replace(/QQ/g,o);e=e.replace(/Q/g,l);e=12>h?e.replace(/A/g,"am"):e.replace(/A/g,"pm");e=e.replace(/YYYY/g,"@IIII@");e=e.replace(/YY/g,"@II@");e=e.replace(/MMMM/g,"@XXXX@");e=e.replace(/MMM/g,"@XXX@");e=e.replace(/MM/g,"@XX@");e=e.replace(/M/g,"@X@");e=e.replace(/DD/g,"@RR@");e=e.replace(/D/g,"@R@");e=e.replace(/EEEE/g,"@PPPP@");e=e.replace(/EEE/g,"@PPP@");e=e.replace(/EE/g,"@PP@");e=e.replace(/E/g,"@P@");e=e.replace(/@IIII@/g,i);e=e.replace(/@II@/g,u);e=e.replace(/@XXXX@/g,AmCharts.monthNames[s]);e=e.replace(/@XXX@/g,AmCharts.shortMonthNames[s]);e=e.replace(/@XX@/g,c);e=e.replace(/@X@/g,s+1);e=e.replace(/@RR@/g,m);e=e.replace(/@R@/g,a);e=e.replace(/@PPPP@/g,AmCharts.dayNames[r]);e=e.replace(/@PPP@/g,AmCharts.shortDayNames[r]);e=e.replace(/@PP@/g,p);return e=e.replace(/@P@/g,r)};AmCharts.changeDate=function(t,e,i,s,a){var r=-1;void 0===s&&(s=!0);void 0===a&&(a=!1);!0===s&&(r=1);switch(e){case"YYYY":t.setFullYear(t.getFullYear()+i*r);s||a||t.setDate(t.getDate()+1);break;case"MM":e=t.getMonth();t.setMonth(t.getMonth()+i*r);t.getMonth()>e+i*r&&t.setDate(t.getDate()-1);s||a||t.setDate(t.getDate()+1);break;case"DD":t.setDate(t.getDate()+i*r);break;case"WW":t.setDate(t.getDate()+i*r*7);break;case"hh":t.setHours(t.getHours()+i*r);break;case"mm":t.setMinutes(t.getMinutes()+i*r);break;case"ss":t.setSeconds(t.getSeconds()+i*r);break;case"fff":t.setMilliseconds(t.getMilliseconds()+i*r)}return t};
//# sourceMappingURL=amcharts.map.js